diff --git a/.github/workflows/ci-e2e.yml b/.github/workflows/ci-e2e.yml index 02b9395297e7a..e70b3a434ea7e 100644 --- a/.github/workflows/ci-e2e.yml +++ b/.github/workflows/ci-e2e.yml @@ -119,11 +119,16 @@ jobs: OBJECT_STORAGE_SECRET_ACCESS_KEY=object_storage_root_password EOT + - name: Lowercase GITHUB_REPOSITORY + id: lowercase + run: | + echo "repository=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + - name: Get the PostHog container image of this PR id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/${{ github.repository }}/posthog + images: ghcr.io/${{ steps.lowercase.outputs.repository }}/posthog - name: Start PostHog run: | diff --git a/.github/workflows/codespaces.yml b/.github/workflows/codespaces.yml index 470200aeb0030..cf6a8c9503ca4 100644 --- a/.github/workflows/codespaces.yml +++ b/.github/workflows/codespaces.yml @@ -31,6 +31,11 @@ jobs: with: fetch-depth: 1 + - name: Lowercase GITHUB_REPOSITORY + id: lowercase + run: | + echo "repository=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + # As ghcr.io complains if the image has upper case letters, we use # this action to ensure we get a lower case version. See # https://github.com/docker/build-push-action/issues/237#issuecomment-848673650 @@ -39,7 +44,7 @@ jobs: id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/${{ github.repository }}/codespaces + images: ghcr.io/${{ steps.lowercase.outputs.repository }}/codespaces tags: | type=ref,event=branch type=raw,value=master @@ -51,7 +56,7 @@ jobs: id: meta-for-cache uses: docker/metadata-action@v4 with: - images: ghcr.io/${{ github.repository }}/codespaces + images: ghcr.io/${{ steps.lowercase.outputs.repository }}/codespaces tags: | type=raw,value=master diff --git a/.github/workflows/container-images-ci.yml b/.github/workflows/container-images-ci.yml index 9ed79f29c34e7..d0f3b302f3b70 100644 --- a/.github/workflows/container-images-ci.yml +++ b/.github/workflows/container-images-ci.yml @@ -34,11 +34,16 @@ jobs: - name: Checkout code uses: actions/checkout@v3 + - name: Lowercase GITHUB_REPOSITORY + id: lowercase + run: | + echo "repository=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + - name: Docker meta id: meta uses: docker/metadata-action@v4 with: - images: ghcr.io/${{ github.repository }}/posthog + images: ghcr.io/${{ steps.lowercase.outputs.repository }}/posthog tags: | type=schedule type=ref,event=branch @@ -109,6 +114,11 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Lowercase GITHUB_REPOSITORY + id: lowercase + run: | + echo "repository=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + - name: Build container images id: build uses: depot/build-push-action@v1 @@ -124,7 +134,7 @@ jobs: # Use the non-cloud image as base image and extend it with # the posthog-cloud code we've checked out. build-args: | - BASE_IMAGE=ghcr.io/${{ github.repository }}/posthog:${{ needs.posthog_build.outputs.container_image_version }} + BASE_IMAGE=ghcr.io/${{ steps.lowercase.outputs.repository }}/posthog:${{ needs.posthog_build.outputs.container_image_version }} deploy_preview: uses: ./.github/workflows/pr-deploy.yml diff --git a/.github/workflows/customer-data-pipeline.yml b/.github/workflows/customer-data-pipeline.yml index 88ad308bc0c37..6a179053a3030 100644 --- a/.github/workflows/customer-data-pipeline.yml +++ b/.github/workflows/customer-data-pipeline.yml @@ -35,10 +35,15 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Lowercase GITHUB_REPOSITORY + id: lowercase + run: | + echo "repository=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + - uses: docker/metadata-action@v4 id: meta with: - images: ghcr.io/${{ github.repository }}/cdp + images: ghcr.io/${{ steps.lowercase.outputs.repository }}/cdp # Make the image tags used for docker cache. We use this rather than # ${{ github.repository }} directly because the repository @@ -47,7 +52,7 @@ jobs: - uses: docker/metadata-action@v4 id: meta-cache with: - images: ghcr.io/${{ github.repository }}/cdp + images: ghcr.io/${{ steps.lowercase.outputs.repository }}/cdp tags: | type=raw,value=cache @@ -128,12 +133,17 @@ jobs: # Run the functional tests. pnpm jest + - name: Lowercase GITHUB_REPOSITORY + id: lowercase + run: | + echo "repository=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" + - name: Generate docker latest tag if: github.ref == 'refs/heads/master' uses: docker/metadata-action@v4 id: meta with: - images: ghcr.io/${{ github.repository }}/cdp + images: ghcr.io/${{ steps.lowercase.outputs.repository }}/cdp tags: | type=raw,value=latest