Skip to content

Commit 504e23c

Browse files
ppiovaclaude
andcommitted
ci: attest published images (multi-arch + SBOM + SLSA provenance)
Bring the publish workflow up to the same supply-chain standard as the other ghcr.io/ppiova images: build linux/amd64 + linux/arm64, attach SBOM and SLSA provenance, and push a keyless-signed build-provenance attestation via GitHub OIDC. Adds id-token/attestations permissions, QEMU setup and per-image build cache scoping. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 5e43a6e commit 504e23c

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
permissions:
1313
contents: read
1414
packages: write
15+
id-token: write
16+
attestations: write
1517
strategy:
1618
matrix:
1719
include:
@@ -22,6 +24,9 @@ jobs:
2224
steps:
2325
- uses: actions/checkout@v4
2426

27+
- name: Set up QEMU
28+
uses: docker/setup-qemu-action@v3
29+
2530
- uses: docker/setup-buildx-action@v3
2631

2732
- name: Log in to GitHub Container Registry
@@ -41,12 +46,23 @@ jobs:
4146
type=sha,format=short
4247
type=semver,pattern={{version}}
4348
44-
- name: Build and push
49+
- name: Build and push (multi-arch)
50+
id: push
4551
uses: docker/build-push-action@v6
4652
with:
4753
context: ${{ matrix.context }}
54+
platforms: linux/amd64,linux/arm64
4855
push: true
4956
tags: ${{ steps.meta.outputs.tags }}
5057
labels: ${{ steps.meta.outputs.labels }}
51-
cache-from: type=gha
52-
cache-to: type=gha,mode=max
58+
cache-from: type=gha,scope=${{ matrix.image }}
59+
cache-to: type=gha,mode=max,scope=${{ matrix.image }}
60+
provenance: true
61+
sbom: true
62+
63+
- name: Attest build provenance
64+
uses: actions/attest-build-provenance@v1
65+
with:
66+
subject-name: ghcr.io/${{ github.repository }}/${{ matrix.image }}
67+
subject-digest: ${{ steps.push.outputs.digest }}
68+
push-to-registry: true

0 commit comments

Comments
 (0)