From c16079f9561300f0929a636bccda83a56a9fafba Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 18 Nov 2026 12:52:15 -0800 Subject: [PATCH 1/3] ci(release): prune unused Docker publish workflows and move PostHog endpoint to a variable Remove the never-run migra and pg_prove Docker Hub publish workflows and read the PostHog endpoint from a repository variable. The Sentry DSN stays a secret because the v2 Go binary still reports to Sentry. (cherry picked from commit 8cbcd4137) Generated with AI Co-Authored-By: Claude --- .github/workflows/build-cli-artifacts.yml | 4 +- .github/workflows/cli-go-pg-prove.yml | 98 ---------------------- .github/workflows/cli-go-publish-migra.yml | 98 ---------------------- .github/workflows/release-shared.yml | 4 - .github/workflows/release.yml | 1 - 5 files changed, 1 insertion(+), 204 deletions(-) delete mode 100644 .github/workflows/cli-go-pg-prove.yml delete mode 100644 .github/workflows/cli-go-publish-migra.yml diff --git a/.github/workflows/build-cli-artifacts.yml b/.github/workflows/build-cli-artifacts.yml index 2e8c2a32db..8af3f77962 100644 --- a/.github/workflows/build-cli-artifacts.yml +++ b/.github/workflows/build-cli-artifacts.yml @@ -37,8 +37,6 @@ on: required: false POSTHOG_API_KEY: required: false - POSTHOG_ENDPOINT: - required: false DF_FIREWALL_TOKEN: required: false @@ -54,7 +52,7 @@ jobs: VERSION: ${{ inputs.version }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - POSTHOG_ENDPOINT: ${{ secrets.POSTHOG_ENDPOINT }} + POSTHOG_ENDPOINT: ${{ vars.POSTHOG_ENDPOINT }} # Fail the build if the macOS signing tool is missing — release artifacts # must be signed (CLI-1621). Local builds without rcodesign degrade to a # warning instead. diff --git a/.github/workflows/cli-go-pg-prove.yml b/.github/workflows/cli-go-pg-prove.yml deleted file mode 100644 index 6a4414ee3f..0000000000 --- a/.github/workflows/cli-go-pg-prove.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Publish pg_prove - -on: - workflow_dispatch: -permissions: - contents: read - -jobs: - settings: - runs-on: ubuntu-latest - outputs: - image_tag: supabase/pg_prove:${{ steps.version.outputs.pg_prove }} - steps: - - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - - uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 - with: - load: true - context: https://github.com/horrendo/pg_prove.git - target: builder - tags: supabase/pg_prove:builder - - id: version - # Replace space with equal to get the raw version string, ie. pg_prove=3.36 - run: | - docker run --rm -a STDOUT supabase/pg_prove:builder pg_prove --version \ - | tr ' ' '=' \ - >> "$GITHUB_OUTPUT" - shell: bash - - build_image: - needs: - - settings - strategy: - matrix: - include: - - runner: [self-hosted, X64] - arch: amd64 - - runner: arm-runner - arch: arm64 - runs-on: ${{ matrix.runner }} - timeout-minutes: 180 - outputs: - image_digest: ${{ steps.build.outputs.digest }} - steps: - - run: docker context create builders - - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - with: - endpoint: builders - - uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - id: build - uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 - with: - push: true - context: https://github.com/horrendo/pg_prove.git - tags: ${{ needs.settings.outputs.image_tag }}_${{ matrix.arch }} - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-pg_prove-${{ matrix.arch }} - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-pg_prove-${{ - matrix.arch }} - - merge_manifest: - needs: - - settings - - build_image - runs-on: ubuntu-latest - steps: - - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - - uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Merge multi-arch manifests - env: - IMAGE_TAG: ${{ needs.settings.outputs.image_tag }} - run: | - docker buildx imagetools create -t "${IMAGE_TAG}" \ - "${IMAGE_TAG}_amd64" \ - "${IMAGE_TAG}_arm64" - - publish: - needs: - - settings - - merge_manifest - permissions: - contents: read - packages: write - id-token: write - # Call workflow explicitly because events from actions cannot trigger more actions - uses: ./.github/workflows/cli-go-mirror-image.yml - with: - image: ${{ needs.settings.outputs.image_tag }} - secrets: - PROD_AWS_ROLE: ${{ secrets.PROD_AWS_ROLE }} -defaults: - run: - working-directory: apps/cli-go diff --git a/.github/workflows/cli-go-publish-migra.yml b/.github/workflows/cli-go-publish-migra.yml deleted file mode 100644 index c3b0a56333..0000000000 --- a/.github/workflows/cli-go-publish-migra.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Publish migra - -on: - workflow_dispatch: -permissions: - contents: read - -jobs: - settings: - runs-on: ubuntu-latest - outputs: - image_tag: supabase/migra:${{ steps.version.outputs.migra }} - steps: - - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - - uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 - with: - load: true - context: https://github.com/djrobstep/migra.git - tags: supabase/migra:builder - - id: version - # Replace space with equal to get the raw version string, ie. migra=3.0.1663481299 - run: | - docker run --rm -a STDOUT supabase/migra:builder pip show migra \ - | grep 'Version' \ - | sed -E 's/Version: (.*)/migra=\1/g' \ - >> "$GITHUB_OUTPUT" - shell: bash - - build_image: - needs: - - settings - strategy: - matrix: - include: - - runner: [self-hosted, X64] - arch: amd64 - - runner: arm-runner - arch: arm64 - runs-on: ${{ matrix.runner }} - timeout-minutes: 180 - outputs: - image_digest: ${{ steps.build.outputs.digest }} - steps: - - run: docker context create builders - - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - with: - endpoint: builders - - uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - id: build - uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 - with: - push: true - context: https://github.com/djrobstep/migra.git - tags: ${{ needs.settings.outputs.image_tag }}_${{ matrix.arch }} - platforms: linux/${{ matrix.arch }} - cache-from: type=gha,scope=${{ github.ref_name }}-migra-${{ matrix.arch }} - cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-migra-${{ matrix.arch - }} - - merge_manifest: - needs: - - settings - - build_image - runs-on: ubuntu-latest - steps: - - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - - uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Merge multi-arch manifests - env: - IMAGE_TAG: ${{ needs.settings.outputs.image_tag }} - run: | - docker buildx imagetools create -t "${IMAGE_TAG}" \ - "${IMAGE_TAG}_amd64" \ - "${IMAGE_TAG}_arm64" - - publish: - needs: - - settings - - merge_manifest - permissions: - contents: read - packages: write - id-token: write - # Call workflow explicitly because events from actions cannot trigger more actions - uses: ./.github/workflows/cli-go-mirror-image.yml - with: - image: ${{ needs.settings.outputs.image_tag }} - secrets: - PROD_AWS_ROLE: ${{ secrets.PROD_AWS_ROLE }} -defaults: - run: - working-directory: apps/cli-go diff --git a/.github/workflows/release-shared.yml b/.github/workflows/release-shared.yml index d2f23adf6a..6130a93517 100644 --- a/.github/workflows/release-shared.yml +++ b/.github/workflows/release-shared.yml @@ -43,8 +43,6 @@ on: required: false POSTHOG_API_KEY: required: false - POSTHOG_ENDPOINT: - required: false GH_APP_PRIVATE_KEY: required: false ANTHROPIC_API_KEY: @@ -66,7 +64,6 @@ jobs: secrets: SENTRY_DSN: ${{ secrets.SENTRY_DSN }} POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - POSTHOG_ENDPOINT: ${{ secrets.POSTHOG_ENDPOINT }} DF_FIREWALL_TOKEN: ${{ secrets.DF_FIREWALL_TOKEN }} build-github: @@ -81,7 +78,6 @@ jobs: secrets: SENTRY_DSN: ${{ secrets.SENTRY_DSN }} POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - POSTHOG_ENDPOINT: ${{ secrets.POSTHOG_ENDPOINT }} DF_FIREWALL_TOKEN: ${{ secrets.DF_FIREWALL_TOKEN }} smoke-test: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4cdf624f8..b70d9a1f98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -260,7 +260,6 @@ jobs: secrets: SENTRY_DSN: ${{ secrets.SENTRY_DSN }} POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - POSTHOG_ENDPOINT: ${{ secrets.POSTHOG_ENDPOINT }} GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} DF_FIREWALL_TOKEN: ${{ secrets.DF_FIREWALL_TOKEN }} From fb58d155ac1b9a2e3257d5dcc12535cf59acce20 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 18 Nov 2026 17:28:09 -0800 Subject: [PATCH 2/3] ci(release): fall back to the EU PostHog host when the endpoint variable is unset Generated with AI Co-Authored-By: Claude --- .github/workflows/build-cli-artifacts.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-cli-artifacts.yml b/.github/workflows/build-cli-artifacts.yml index 8af3f77962..9f8060cb96 100644 --- a/.github/workflows/build-cli-artifacts.yml +++ b/.github/workflows/build-cli-artifacts.yml @@ -52,7 +52,8 @@ jobs: VERSION: ${{ inputs.version }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - POSTHOG_ENDPOINT: ${{ vars.POSTHOG_ENDPOINT }} + # The Go binary has no built-in PostHog host, so an unset variable must not ship an empty one. + POSTHOG_ENDPOINT: ${{ vars.POSTHOG_ENDPOINT || 'https://eu.i.posthog.com' }} # Fail the build if the macOS signing tool is missing — release artifacts # must be signed (CLI-1621). Local builds without rcodesign degrade to a # warning instead. From 51587e0583b2d0db1e81375dedbc51b9fa8d0095 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 18 Nov 2026 17:58:04 -0800 Subject: [PATCH 3/3] ci(release): drop the PostHog endpoint fallback now that the variable exists Generated with AI Co-Authored-By: Claude --- .github/workflows/build-cli-artifacts.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-cli-artifacts.yml b/.github/workflows/build-cli-artifacts.yml index 9f8060cb96..8af3f77962 100644 --- a/.github/workflows/build-cli-artifacts.yml +++ b/.github/workflows/build-cli-artifacts.yml @@ -52,8 +52,7 @@ jobs: VERSION: ${{ inputs.version }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }} - # The Go binary has no built-in PostHog host, so an unset variable must not ship an empty one. - POSTHOG_ENDPOINT: ${{ vars.POSTHOG_ENDPOINT || 'https://eu.i.posthog.com' }} + POSTHOG_ENDPOINT: ${{ vars.POSTHOG_ENDPOINT }} # Fail the build if the macOS signing tool is missing — release artifacts # must be signed (CLI-1621). Local builds without rcodesign degrade to a # warning instead.