Skip to content

Commit ad8d10c

Browse files
committed
Add SLSA3 provenance to FC builds
1 parent 260fdcf commit ad8d10c

File tree

4 files changed

+52
-9
lines changed

4 files changed

+52
-9
lines changed

.github/workflows/aws_cicd.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
name: aws-cicd
22
on:
3-
push:
4-
branches:
5-
- main
63
workflow_dispatch:
7-
pull_request:
4+
workflow_call:
85
concurrency:
96
group: "AWS"
10-
# cancel-in-progress: true
7+
cancel-in-progress: true
118
jobs:
129
deploy:
1310
name: AWS

.github/workflows/cicd.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
workflow_dispatch:
10+
11+
jobs:
12+
aws:
13+
uses: ./.github/workflows/aws_cicd.yaml
14+
15+
gcp:
16+
uses: ./.github/workflows/gcp_cicd.yaml
17+
18+
slsa:
19+
uses: ./.github/workflows/provenance.yaml
20+
needs: [aws, gcp]

.github/workflows/gcp_cicd.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
<<<<<<< HEAD
12
name: gcp-cicd
3+
=======
4+
name: gcp
5+
>>>>>>> b0b73b43 (Add SLSA3 provenance to FC builds)
26
on:
3-
push:
4-
branches:
5-
- main
67
workflow_dispatch:
7-
pull_request:
8+
workflow_call:
89
concurrency:
910
group: "GCP"
1011
cancel-in-progress: true

.github/workflows/provenance.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
workflow_call:
3+
4+
jobs:
5+
build:
6+
outputs:
7+
hashes: ${{ steps.hash.outputs.hashes }}
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Generate hashes
11+
shell: bash
12+
id: hash
13+
run: |
14+
make synth
15+
echo "hashes=$(tar cf - infrastructure | sha256sum | base64 -w0)" >> "$GITHUB_OUTPUT"
16+
provenance:
17+
needs: [build]
18+
permissions:
19+
actions: read
20+
id-token: write
21+
contents: write
22+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.5.0
23+
with:
24+
base64-subjects: "${{ needs.build.outputs.hashes }}"
25+
upload-assets: true

0 commit comments

Comments
 (0)