-
Notifications
You must be signed in to change notification settings - Fork 25
54 lines (48 loc) · 1.81 KB
/
e2e.container-based.workflow_dispatch.main.adversarial-verifier-binary.slsa3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
on:
# Only triggered manually for pre-release.
workflow_dispatch:
permissions: read-all
jobs:
build:
outputs:
digests: ${{ steps.hash.outputs.digests }}
runs-on: ubuntu-latest
steps:
- name: Build artifacts
run: |
# These are some amazing artifacts.
echo "artifact1" > artifact1
echo "artifact2" > artifact2
- name: Generate hashes
shell: bash
id: hash
run: |
# sha256sum generates sha256 hash for all artifacts.
# base64 -w0 encodes to base64 and outputs on a single line.
# sha256sum artifact1 artifact2 ... | base64 -w0
echo "digests=$(sha256sum artifact1 artifact2 | base64 -w0)" >> "${GITHUB_OUTPUT}"
provenance:
needs: [build]
permissions:
id-token: write # For signing.
contents: write # For asset uploads.
actions: read # For the entrypoint.
# Update the reference in this line with the builder's version to test.
# uses: ianlewis/slsa-github-generator/.github/workflows/builder_container-based_slsa3.yml@v1.8.0-rc.2
uses: laurentsimon/slsa-github-generator/.github/workflows/builder_container-based_slsa3.yml@v1.10.0-rc.0
# uses: kpk47/slsa-github-generator/.github/workflows/builder_container-based_slsa3.yml@v1.9.1-rc.0
with:
builder-image: "bash"
builder-digest: "sha256:9e2ba52487d945504d250de186cb4fe2e3ba023ed2921dd6ac8b97ed43e76af9"
config-path: ".github/configs-docker/config.toml"
provenance-name: attestation.intoto
if-succeeded:
runs-on: ubuntu-latest
needs: [provenance]
if: needs.provenance.result == 'success'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: |
set -euo pipefail
echo "This test should fail"
exit 1