Skip to content

Commit c693540

Browse files
committed
Sign tejolote's provenance attestation
Signed-off-by: Adolfo Garcia Veytia (puerco) <puerco@carabiner.dev>
1 parent c772365 commit c693540

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ jobs:
6060
runs-on: ubuntu-latest
6161

6262
permissions:
63-
id-token: write
64-
contents: write
63+
id-token: write # To sign the attestation
64+
contents: write # To push to the release
6565

6666
needs:
6767
- release
@@ -81,19 +81,19 @@ jobs:
8181
go-version-file: go.mod
8282
cache: false
8383

84+
- name: Setup bnd
85+
uses: carabiner-dev/actions/install/bnd@440c76def32d40be101b68d1f6a6b284b79aa74c # v1.1.2
86+
8487
- name: Build tejolote from source
8588
run: go build -o "${{ runner.temp }}/tejolote" ./cmd/tejolote/
8689

87-
- run: |
88-
"${{ runner.temp }}/tejolote" attest --artifacts github://kubernetes-sigs/tejolote/${{ steps.tag.outputs.tag_name }} github://kubernetes-sigs/tejolote/"${GITHUB_RUN_ID}" --output tejolote.intoto.json --sign
90+
- name: Generate and sign provenance
8991
env:
9092
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
run: |
94+
"${{ runner.temp }}/tejolote" attest \
95+
--artifacts github://kubernetes-sigs/tejolote/${{ steps.tag.outputs.tag_name }} \
96+
github://kubernetes-sigs/tejolote/"${GITHUB_RUN_ID}" --output provenance.json
9197
92-
- name: Release
93-
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
94-
with:
95-
files: tejolote.intoto.json
96-
tag_name: "${{ steps.tag.outputs.tag_name }}"
97-
token: ${{ secrets.GITHUB_TOKEN }}
98-
env:
99-
GITHUB_REPOSITORY: kubernetes-sigs/tejolote
98+
bnd statement provenance.json -o tejolote-${{ steps.tag.outputs.tag_name }}.provenance.json \
99+
gh release upload ${{ steps.tag.outputs.tag_name }} tejolote-${{ steps.tag.outputs.tag_name }}.provenance.json

0 commit comments

Comments
 (0)