Author SHA1 Message Date
Sharang ParnerkarandClaude Fable 5 fa07b3bae0 ci: the image job never ran — fix its condition, tag :latest, deploy for real
ci / shared (pull_request) Failing after 4s
ci / test (pull_request) Successful in 21m22s
ci / image (pull_request) Skipped
Three defects left the deployment frozen on an Aug-06 image while five
RBAC merges landed on main:

1. The job-level `hashFiles('Dockerfile')` condition evaluates BEFORE
   checkout, against an empty workspace — always '', so the job was
   silently skipped on every push to main.
2. Had it run, it pushed only sha-* and env-stage tags; orca deploys
   :latest, which nothing ever updated.
3. The final step ran `orca apply --env=stage` against a stage
   environment this cluster does not have.

Now: condition without hashFiles (the Dockerfile is not optional),
:latest tagged alongside sha-*, and the deploy step replaced with the
HMAC-signed orca webhook the other repos use (registered on the master;
ORCA_WEBHOOK_SECRET set as a repo Actions secret).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-30 23:10:18 +02:00
+21 -5
View File
@@ -94,7 +94,10 @@ jobs:
image: image:
needs: [shared, test] needs: [shared, test]
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && hashFiles('Dockerfile') != '' # 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'
runs-on: docker runs-on: docker
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -110,13 +113,26 @@ jobs:
push: true push: true
tags: | tags: |
repo.breakpilot.com/breakpilot/${{ github.event.repository.name }}:sha-${{ github.sha }} repo.breakpilot.com/breakpilot/${{ github.event.repository.name }}:sha-${{ github.sha }}
repo.breakpilot.com/breakpilot/${{ github.event.repository.name }}:env-stage repo.breakpilot.com/breakpilot/${{ github.event.repository.name }}:latest
- uses: anchore/sbom-action@v0 - uses: anchore/sbom-action@v0
with: with:
image: repo.breakpilot.com/breakpilot/${{ github.event.repository.name }}:sha-${{ github.sha }} image: repo.breakpilot.com/breakpilot/${{ github.event.repository.name }}:sha-${{ github.sha }}
- name: orca deploy stage # Notify orca to pull :latest and recreate the service (same pattern as
run: orca apply --env=stage --image-tag=sha-${{ github.sha }} # breakpilot-core/build-pitch-deck.yml). The stage-env deploy this used to
# attempt does not exist in this cluster.
- name: orca deploy webhook
env: env:
ORCA_TOKEN: ${{ secrets.ORCA_STAGE_TOKEN }} ORCA_WEBHOOK_SECRET: ${{ secrets.ORCA_WEBHOOK_SECRET }}
ORCA_WEBHOOK_URL: http://46.225.100.82:6880/api/v1/webhooks/github
run: |
set -euo pipefail
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"