From 04f3e356e364912d2462dda2af0534667ffe75e6 Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Wed, 28 Oct 2026 20:08:22 +0100 Subject: [PATCH] ci: the release branch builds a production image only The branch is 9129e95 plus the go-jose fix (#98). Its image job pushes :sha- alone and fires no orca webhook, so stage keeps running main. The job log prints the repo digest for the platform-prod pin. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014aRnCGqELxoix5TfpX8Ejf --- .gitea/workflows/ci.yaml | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index fd647e3..e4f7b48 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -6,7 +6,7 @@ on: pull_request: branches: [main] push: - branches: [main] + branches: [main, release/registry-9129e95] jobs: shared: @@ -97,7 +97,9 @@ jobs: # NOTE: no hashFiles() here — at job level it evaluates BEFORE checkout # against an empty workspace, so the old condition was always false and # this job silently never ran (deployment sat on an Aug-06 image). - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + # Release branch: builds the production image only (9129e95 + #98). + # It pushes :sha- alone and fires no webhook, so stage is untouched. + if: github.event_name == 'push' && github.ref == 'refs/heads/release/registry-9129e95' runs-on: docker # The runner's default job container has no docker CLI, so # docker/login-action + docker/build-push-action die with "Unable to @@ -129,28 +131,7 @@ jobs: docker build \ --build-arg VERSION="$VERSION" \ --build-arg COMMIT="${GITHUB_SHA}" \ - -t repo.breakpilot.com/platform/tenant-registry:latest \ -t repo.breakpilot.com/platform/tenant-registry:sha-${GITHUB_SHA} \ . - docker push repo.breakpilot.com/platform/tenant-registry:latest docker push repo.breakpilot.com/platform/tenant-registry:sha-${GITHUB_SHA} - - # Notify the platform cluster master (orca-platform/WEBHOOKS.md) to pull - # :latest and recreate tenant-registry-stage. Only when the repo variable - # ORCA_WEBHOOK_URL is set (M-MIG-3) — until then the image is pushed and - # nothing is deployed. - - name: orca deploy webhook - if: vars.ORCA_WEBHOOK_URL != '' - env: - ORCA_WEBHOOK_SECRET: ${{ secrets.ORCA_WEBHOOK_SECRET }} - ORCA_WEBHOOK_URL: ${{ vars.ORCA_WEBHOOK_URL }} - run: | - set -eu - PAYLOAD="{\"ref\":\"refs/heads/main\",\"repository\":{\"full_name\":\"${GITHUB_REPOSITORY}\"},\"head_commit\":{\"id\":\"${GITHUB_SHA}\",\"message\":\"ci: tenant-registry image build\"}}" - SIG=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$ORCA_WEBHOOK_SECRET" -r | awk '{print $1}') - curl -sSf -k \ - -H "Content-Type: application/json" \ - -H "X-GitHub-Event: push" \ - -H "X-Hub-Signature-256: sha256=$SIG" \ - -d "$PAYLOAD" \ - "$ORCA_WEBHOOK_URL" + echo "digest: $(docker image inspect -f '{{join .RepoDigests " "}}' repo.breakpilot.com/platform/tenant-registry:sha-${GITHUB_SHA})"