feat(replay-vision): API validation + lens_result row column #216754
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Container Images CI | |
| on: | |
| pull_request: | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| if: github.repository == 'PostHog/posthog' && github.event_name != 'merge_group' | |
| name: Determine need to run Docker checks | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| # Set job outputs to values from filter step | |
| outputs: | |
| docker_files: ${{ steps.filter.outputs.docker_files }} | |
| steps: | |
| - uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 | |
| id: app-token | |
| if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| with: | |
| client-id: ${{ secrets.GH_APP_POSTHOG_PATHS_FILTER_APP_ID }} | |
| private-key: ${{ secrets.GH_APP_POSTHOG_PATHS_FILTER_PRIVATE_KEY }} | |
| - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: filter | |
| with: | |
| token: ${{ steps.app-token.outputs.token || github.token }} | |
| predicate-quantifier: 'every' | |
| filters: | | |
| docker_files: | |
| - '**' | |
| - '!rust/**' | |
| - '!livestream/**' | |
| posthog_build: | |
| needs: changes | |
| name: Build Docker image | |
| # run these on 4, if they're RAM constrained the FE build will fail randomly in Docker build | |
| runs-on: depot-ubuntu-latest-4 | |
| timeout-minutes: 30 | |
| permissions: | |
| id-token: write # allow issuing OIDC tokens for this workflow run | |
| contents: read # allow at least reading the repo contents, add other permissions if necessary | |
| # Only on PostHog/posthog, as there's no docker login on forks | |
| if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.docker_files == 'true') || github.event_name == 'merge_group' }} | |
| outputs: | |
| digest: ${{ steps.build.outputs.digest }} | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v6 | |
| - name: Build and cache Docker image in Depot | |
| id: build | |
| uses: ./.github/actions/build-n-cache-image | |
| with: | |
| actions-id-token-request-url: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL }} | |
| push-image: ${{ github.repository == 'PostHog/posthog' }} # Don't push on forks due to lack of credentials | |
| aws-role-to-assume: ${{ secrets.AWS_ECR_PUBLISH_IAM_ROLE }} | |
| dockerhub-username: ${{ secrets.DOCKERHUB_USER }} | |
| dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| pr-number: ${{ github.event.number }} | |
| no-cache: ${{ contains(github.event.pull_request.labels.*.name, 'no-depot-docker-cache') }} | |
| - name: Container image digest | |
| env: | |
| IMAGE_DIGEST: ${{ steps.build.outputs.digest }} | |
| IMAGE_REGISTRY: ${{ steps.build.outputs.registry }} | |
| run: | | |
| echo "Image digest: $IMAGE_DIGEST" | |
| echo "## Container image built :rocket:" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Image reference:** \`$IMAGE_REGISTRY/posthog-cloud@$IMAGE_DIGEST\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Image SHA:** \`${{ github.sha }}@$IMAGE_DIGEST\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- Commit: \`${{ github.sha }}\`" >> $GITHUB_STEP_SUMMARY | |
| echo "- Digest: \`$IMAGE_DIGEST\`" >> $GITHUB_STEP_SUMMARY | |
| lint: | |
| name: Lint changed Dockerfiles | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| filter: blob:none | |
| - name: Check if any Dockerfile has changed | |
| id: changed-files | |
| uses: step-security/changed-files@2e07db73e5ccdb319b9a6c7766bd46d39d304bad # v47.0.5 | |
| with: | |
| files: | | |
| **/Dockerfile | |
| **/*.Dockerfile | |
| **/Dockerfile.* | |
| separator: ' ' | |
| - name: Lint changed Dockerfile(s) with Hadolint | |
| uses: jbergstroem/hadolint-gh-action@2b00b87f8a56783930b6a4749837d7c45c567ff2 # v1.13.0 | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| with: | |
| dockerfile: '${{ steps.changed-files.outputs.all_modified_files }}' |