Skip to content

Commit a30483a

Browse files
committed
Add artifact attestation step to Docker workflow for improved supply chain security
1 parent 5196324 commit a30483a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/docker-publish.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ jobs:
88
push_to_docker_hub:
99
name: Push to Docker Hub
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
attestations: write
14+
id-token: write
1115
steps:
1216
- name: Checkout repository
1317
uses: actions/checkout@v4
@@ -30,9 +34,17 @@ jobs:
3034
type=sha
3135
3236
- name: Build and push Docker image
37+
id: push
3338
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
3439
with:
3540
context: .
3641
push: true
3742
tags: ${{ steps.meta.outputs.tags }}
38-
labels: ${{ steps.meta.outputs.labels }}
43+
labels: ${{ steps.meta.outputs.labels }}
44+
45+
- name: Generate artifact attestation
46+
uses: actions/attest-build-provenance@v2
47+
with:
48+
subject-name: index.docker.io/hanqyu/mcp-github-sse
49+
subject-digest: ${{ steps.push.outputs.digest }}
50+
push-to-registry: true

0 commit comments

Comments
 (0)