Skip to content

Commit

Permalink
[CI] Attest build artifacts (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamazeem authored Sep 27, 2024
1 parent c011cf5 commit 78413b8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:

permissions:
contents: write
id-token: write
attestations: write

env:
TAG: ${{ needs.tag.outputs.TAG }}
Expand Down Expand Up @@ -179,6 +181,21 @@ jobs:
- name: Prepare build artifacts for upload
run: ./scripts/ci-prepare-artifacts-for-upload.sh

- name: Attest build artifacts
uses: actions/attest-build-provenance@v1
with:
subject-path: ${{ env.ARTIFACT_DIR }}/*

- name: Verify attested artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for ARTIFACT in "$ARTIFACT_DIR"/*; do
echo "[INF] Veriyfing artifact... [$ARTIFACT]"
gh attestation verify "$ARTIFACT" --repo "$GITHUB_REPOSITORY"
echo "[INF] Verified successfully! [$ARTIFACT]"
done
- name: Upload (zsv-${{ env.TAG }}-${{ env.AMD64_LINUX_GCC }}.zip)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 78413b8

Please sign in to comment.