Update SLSA generators to v1.4.0 (#1884)
Since GitHub's deprecation of `set-ouput`, the SLSA reusable workflows needed to change. This PR updates them to the latest version. Fixes https://github.com/slsa-framework/slsa-github-generator/issues/1302 Signed-off-by: Mihai Maruseac <[email protected]> Signed-off-by: Mihai Maruseac <[email protected]> Co-authored-by: Sampark Sharma <[email protected]>
This commit is contained in:
co-authored by
Sampark Sharma
parent
28a47a7bc4
commit
f95dae101b
@@ -16,8 +16,6 @@ on:
|
|||||||
release:
|
release:
|
||||||
types: [created]
|
types: [created]
|
||||||
|
|
||||||
permissions: read-all
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -46,7 +44,7 @@ jobs:
|
|||||||
# provenance for.
|
# provenance for.
|
||||||
#
|
#
|
||||||
# ========================================================
|
# ========================================================
|
||||||
- name: Generate subject
|
- name: Generate subject for provenance
|
||||||
id: hash
|
id: hash
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
@@ -54,7 +52,7 @@ jobs:
|
|||||||
# List the artifacts the provenance will refer to.
|
# List the artifacts the provenance will refer to.
|
||||||
files=$(ls artifact*)
|
files=$(ls artifact*)
|
||||||
# Generate the subjects (base64 encoded).
|
# Generate the subjects (base64 encoded).
|
||||||
echo "::set-output name=digests::$(sha256sum $files | base64 -w0)"
|
echo "hashes=$(sha256sum $files | base64 -w0)" >> "${GITHUB_OUTPUT}"
|
||||||
|
|
||||||
provenance:
|
provenance:
|
||||||
needs: [build]
|
needs: [build]
|
||||||
@@ -62,7 +60,7 @@ jobs:
|
|||||||
actions: read # To read the workflow path.
|
actions: read # To read the workflow path.
|
||||||
id-token: write # To sign the provenance.
|
id-token: write # To sign the provenance.
|
||||||
contents: write # To add assets to a release.
|
contents: write # To add assets to a release.
|
||||||
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.2.0
|
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.4.0
|
||||||
with:
|
with:
|
||||||
base64-subjects: "${{ needs.build.outputs.digests }}"
|
base64-subjects: "${{ needs.build.outputs.digests }}"
|
||||||
upload-assets: true # Optional: Upload to a new release
|
upload-assets: true # Optional: Upload to a new release
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
id-token: write # To sign.
|
id-token: write # To sign.
|
||||||
contents: write # To upload release assets.
|
contents: write # To upload release assets.
|
||||||
actions: read # To read workflow path.
|
actions: read # To read workflow path.
|
||||||
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.2.0
|
uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0
|
||||||
with:
|
with:
|
||||||
go-version: 1.17
|
go-version: 1.17
|
||||||
# =============================================================================================================
|
# =============================================================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user