Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
outputs:
version: ${{ steps.derive.outputs.version }}
tag: ${{ steps.derive.outputs.tag }}
sha: ${{ steps.derive.outputs.sha }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
Expand All @@ -48,6 +49,7 @@ jobs:
fi
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
echo "✓ tag=$TAG / version=$VERSION / appVersion=$APP_VER all aligned"

image:
Expand Down Expand Up @@ -79,6 +81,9 @@ jobs:
type=raw,value=${{ needs.preflight.outputs.version }}
type=raw,value=${{ needs.preflight.outputs.tag }}
type=semver,pattern={{major}}.{{minor}}
# github.sha is the dispatching branch head; label the built tag commit.
labels: |
org.opencontainers.image.revision=${{ needs.preflight.outputs.sha }}
- id: push
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
Expand Down Expand Up @@ -124,7 +129,7 @@ jobs:
actions: read
id-token: write
packages: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@f7dd8c54c2067bafc12ca7a55595d5ee9b75204a # v2.1.0
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0 # f7dd8c54 — generator rejects SHA refs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bind dispatched provenance to the selected tag commit

When workflow_dispatch runs from a branch such as main with inputs.tag pointing to a release tag, the image job checks out that tag, but the reusable workflow records the caller's branch ref and SHA in its provenance. With this change, the provenance job can succeed and sign an attestation tying the tag-built image digest to the branch commit; the new image label does not correct the attestation. Ensure provenance uses the selected release ref/SHA, or avoid issuing this attestation for branch-dispatched tag releases.

Useful? React with 👍 / 👎.

with:
image: ghcr.io/keiailab/postgres-operator
digest: ${{ needs.image.outputs.digest }}
Expand Down
Loading