Skip to content

Commit 76f6517

Browse files
committed
Adding attestation and permissions for standalone image
1 parent 97a3a50 commit 76f6517

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/image-build-source.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
runs-on: ubuntu-latest
2424
## Requires the repo environment "Push to Docker", which will trigger a secondary approval step before running this workflow.
2525
environment: "Push to Docker"
26+
permissions:
27+
id-token: write
28+
attestations: write
2629
steps:
2730
## Setup Docker for the builds
2831
- name: Docker setup
@@ -68,3 +71,24 @@ jobs:
6871
GIT_COMMIT=${{ env.GITHUB_SHA_SHORT }}
6972
TARGET_CPU=x86-64-v3
7073
push: ${{ env.DOCKER_PUSH }}
74+
75+
## Generate docker image attestation(s)
76+
- name: Generate artifact attestation (${{ github.event.repository.name }})
77+
id: attest_primary
78+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
79+
with:
80+
# subject-name: index.docker.io/${{ env.docker-org }}/${{ github.event.repository.name }}
81+
subject-name: |
82+
index.docker.io/${{env.docker-org}}/${{ github.event.repository.name }}
83+
subject-digest: ${{ steps.docker_build.outputs.digest }}
84+
push-to-registry: true
85+
86+
- name: Generate artifact attestation (stacks-blockchain)
87+
id: attest_secondary
88+
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
89+
with:
90+
# subject-name: index.docker.io/${{ env.docker-org }}/${{ github.event.repository.name }}
91+
subject-name: |
92+
index.docker.io/${{env.docker-org}}/stacks-blockchain
93+
subject-digest: ${{ steps.docker_build.outputs.digest }}
94+
push-to-registry: true

0 commit comments

Comments
 (0)