2525 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2626
2727jobs :
28- build :
28+ generic- build :
2929 outputs :
3030 hashes : ${{ steps.hash.outputs.hashes }}
3131 runs-on : ubuntu-latest
@@ -61,21 +61,21 @@ jobs:
6161 if-no-files-found : error
6262 retention-days : 5
6363
64- provenance :
65- needs : build
64+ generic- provenance :
65+ needs : generic- build
6666 permissions :
6767 id-token : write # For signing.
6868 contents : write # For asset uploads.
6969 actions : read # For reading workflow info.
7070 uses : ./.github/workflows/generator_generic_slsa3.yml
7171 with :
72- base64-subjects : " ${{ needs.build.outputs.hashes }}"
72+ base64-subjects : " ${{ needs.generic- build.outputs.hashes }}"
7373 compile-generator : true
74- provenance-name : build.intoto.jsonl
74+ provenance-name : generic- build.intoto.jsonl
7575 upload-assets : true
7676
77- verify :
78- needs : provenance
77+ generic- verify :
78+ needs : generic- provenance
7979 runs-on : ubuntu-latest
8080 steps :
8181 - name : Download artifact1
8989 - name : Download provenance
9090 uses : actions/download-artifact@v4
9191 with :
92- name : build.intoto.jsonl
92+ name : " ${{ needs.generic-provenance.outputs.provenance-name }} "
9393 - uses : actions/setup-go@v5
9494 with :
9595 go-version : 1.22
9999 run : |
100100 SLSA_VERIFIER_TESTING=1 slsa-verifier verify-artifact \
101101 artifact1 artifact2 \
102- --provenance-path build.intoto.jsonl \
102+ --provenance-path generic- build.intoto.jsonl \
103103 --source-uri github.com/slsa-framework/slsa-github-generator \
104104 --source-branch ramonpetgrave64-internal-builder-sigstore-bundle \
105105 --print-provenance
106+
107+ go-build :
108+ uses : ./.github/workflows/builder_go_slsa3.yml
109+ with :
110+ go-version : 1.22
111+
112+ go-verify :
113+ needs : generic-provenance
114+ runs-on : ubuntu-latest
115+ steps :
116+ - name : Download artifact
117+ uses : actions/download-artifact@v4
118+ with :
119+ name : " ${{ needs.go-build.outputs.go-binary-name }}"
120+ - name : Download provenance
121+ uses : actions/download-artifact@v4
122+ with :
123+ name : " ${{ needs.go-build.outputs.go-provenance-name }}"
124+ - uses : actions/setup-go@v5
125+ with :
126+ go-version : 1.22
127+ - name : Setup slsa-verifier
128+ run : go install github.com/slsa-framework/slsa-verifier/v2/cli/slsa-verifier@verify-sigstore-go-Bundlev2
129+ - name : Verify
130+ env :
131+ ARTIFACT : " ${{ needs.go-build.outputs.go-provenance-name }}"
132+ PROVENANCE : " ${{ needs.go-build.outputs.go-provenance-name }}"
133+ run : |
134+ SLSA_VERIFIER_TESTING=1 slsa-verifier verify-artifact \
135+ "$ARTIFACT" \
136+ --provenance-path "$PROVENANCE" \
137+ --source-uri github.com/slsa-framework/slsa-github-generator \
138+ --source-branch ramonpetgrave64-internal-builder-sigstore-bundle \
139+ --print-provenance
0 commit comments