Summary
On workflow_run-triggered jobs, github.sha points to the default branch HEAD — not the commit that passed the upstream workflow. This causes actions/checkout to check out a different revision than what was tested, allowing a build-one-commit/deploy-another-manifests scenario.
Affected file
.github/workflows/deploy-frontend.yml — lines 64-67, 105-106, 121-123, 185-187
Required fix
Use github.event.workflow_run.head_sha as the ref input on every actions/checkout step and for the org.opencontainers.image.revision OCI label:
- uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
References