Skip to content

Commit b595e06

Browse files
fix: upload-artifact and download-artifact v4 (#3312)
# Summary - Fixes #3068 to use upload-artifact and download-artifact v4 - following up in slsa-framework/example-package#336 ## Testing Process This change is tested with our existing PR Check workflows that use both directly and indirectly call upload-artifact and download-artifact. - One test for `secure-upload-folder` should fail in this PR because it will use `secure-upload-artifact@main`. There's no workaround to dynamically use the PR's ref instead of `@main`, but after merging this PR, the test should start passing. ## Checklist - [x] Review the contributing [guidelines](./../CONTRIBUTING.md) - [x] Add a reference to related issues in the PR description. - [x] Update documentation if applicable. - [x] Add unit tests if applicable. - [x] Add changes to the [CHANGELOG](./../CHANGELOG.md) if applicable. --------- Signed-off-by: Ramon Petgrave <[email protected]> Signed-off-by: laurentsimon <[email protected]> Co-authored-by: laurentsimon <[email protected]>
1 parent e64a212 commit b595e06

File tree

14 files changed

+41
-33
lines changed

14 files changed

+41
-33
lines changed

.github/actions/secure-download-artifact/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ runs:
7878
echo "folder_path=${folder_path}" >> "${GITHUB_OUTPUT}"
7979
8080
- name: Download the artifact
81-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
81+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
8282
with:
8383
name: "${{ inputs.name }}"
8484
path: "${{ steps.validate-path.outputs.folder_path }}"

.github/actions/secure-download-folder/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
uses: slsa-framework/slsa-github-generator/.github/actions/rng@main
3535

3636
- name: Download the artifact
37-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
37+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
3838
with:
3939
name: "${{ inputs.name }}"
4040
path: "${{ steps.rng.outputs.random }}"

.github/actions/secure-upload-artifact/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ runs:
3737
path: "${{ inputs.path }}"
3838

3939
- name: Upload the artifact
40-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
40+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
4141
with:
4242
name: "${{ inputs.name }}"
4343
path: "${{ inputs.path }}"

.github/workflows/builder_container-based_slsa3.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ jobs:
209209
allow-private-repository: ${{ inputs.rekor-log-public }}
210210

211211
- name: Upload builder
212-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
212+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
213213
with:
214214
name: "${{ env.BUILDER_BINARY }}-${{ needs.rng.outputs.value }}"
215215
path: "${{ env.BUILDER_BINARY }}"
@@ -462,7 +462,7 @@ jobs:
462462
# TODO(https://github.com/slsa-framework/slsa-github-generator/issues/1655): Use a
463463
# secure upload or verify this against the SLSA layout file.
464464
id: upload-artifacts
465-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
465+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
466466
with:
467467
name: ${{ steps.build.outputs.build-outputs-name }}
468468
path: /tmp/build-outputs-${{ needs.rng.outputs.value }}
@@ -535,7 +535,7 @@ jobs:
535535
- name: Upload unsigned intoto attestations file for pull request
536536
if: ${{ github.event_name == 'pull_request' }}
537537
id: upload-unsigned
538-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
538+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
539539
with:
540540
name: "${{ env.OUTPUT_FOLDER }}-${{ needs.rng.outputs.value }}"
541541
path: "attestations-${{ needs.rng.outputs.value }}"
@@ -556,7 +556,7 @@ jobs:
556556
- name: Upload the signed attestations
557557
id: upload-signed
558558
if: ${{ github.event_name != 'pull_request' }}
559-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
559+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
560560
with:
561561
name: "${{ env.OUTPUT_FOLDER }}-${{ needs.rng.outputs.value }}"
562562
path: "${{ env.OUTPUT_FOLDER }}-${{ needs.rng.outputs.value }}"
@@ -584,15 +584,15 @@ jobs:
584584
# TODO(https://github.com/slsa-framework/slsa-github-generator/issues/1655): Use the SLSA
585585
# layout files and their checksums to validate the artifacts.
586586
- name: Download artifacts
587-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
587+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
588588
with:
589589
name: "${{ needs.build.outputs.build-outputs-name }}"
590590
path: "${{ needs.build.outputs.build-outputs-name }}"
591591

592592
# TODO(https://github.com/slsa-framework/slsa-github-generator/issues/1655): Use the
593593
# secure-folder-download action.
594594
- name: Download provenance
595-
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
595+
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
596596
with:
597597
name: "${{ needs.provenance.outputs.provenance-name }}"
598598
path: "${{ needs.provenance.outputs.provenance-name }}"

.github/workflows/builder_go_slsa3.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ jobs:
169169
allow-private-repository: ${{ inputs.private-repository }}
170170

171171
- name: Upload builder
172-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
172+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
173173
with:
174174
name: "${{ env.BUILDER_BINARY }}-${{ needs.rng.outputs.value }}"
175175
path: "${{ env.BUILDER_BINARY }}"
@@ -358,7 +358,7 @@ jobs:
358358
--workingDir "$UNTRUSTED_WORKING_DIR"
359359
360360
- name: Upload the signed provenance
361-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
361+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
362362
with:
363363
name: "${{ steps.sign-prov.outputs.signed-provenance-name }}"
364364
path: "${{ steps.sign-prov.outputs.signed-provenance-name }}"

.github/workflows/generator_generic_slsa3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ jobs:
238238
- name: Upload the signed provenance
239239
id: upload-prov
240240
continue-on-error: true
241-
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
241+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
242242
with:
243243
name: "${{ steps.sign-prov.outputs.provenance-name }}"
244244
path: "${{ steps.sign-prov.outputs.provenance-name }}"

.github/workflows/pre-submit.actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
fi
9999
100100
# If index.js was different from expected, upload the expected version as an artifact
101-
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
101+
- uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
102102
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
103103
with:
104104
name: dist

.github/workflows/pre-submit.e2e.container-based.default.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
GITHUB_HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
4747
steps:
4848
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
49-
- uses: actions/download-artifact@e9ef242655d12993efdcda9058dee2db83a2cb9b
49+
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
5050
with:
5151
name: ${{ needs.build-container-based.outputs.build-outputs-name }}
5252
path: outputs
@@ -57,7 +57,7 @@ jobs:
5757
name=$(find outputs/ -type f | head -1)
5858
cp "$name" .
5959
echo "name=$(basename "$name")" >> "$GITHUB_OUTPUT"
60-
- uses: actions/download-artifact@e9ef242655d12993efdcda9058dee2db83a2cb9b
60+
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
6161
with:
6262
name: ${{ needs.build-container-based.outputs.attestations-download-name }}
6363
- env:

.github/workflows/pre-submit.e2e.generic.default.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
if: ${{ always() }}
4848
steps:
4949
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
50-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
50+
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
5151
with:
5252
name: ${{ needs.build.outputs.provenance-name }}
5353
- env:
@@ -76,7 +76,7 @@ jobs:
7676
needs: [build-continue-no-error]
7777
steps:
7878
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
79-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
79+
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
8080
with:
8181
name: ${{ needs.build-continue-no-error.outputs.provenance-name }}
8282
- env:
@@ -106,7 +106,7 @@ jobs:
106106
needs: [build, build-continue-invalid-subjects]
107107
steps:
108108
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
109-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
109+
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
110110
with:
111111
name: ${{ needs.build.outputs.provenance-name }}
112112
- env:

.github/workflows/pre-submit.e2e.go.config-ldflags-main-dir.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ jobs:
6565
if: ${{ always() }}
6666
steps:
6767
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
68-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
68+
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
6969
with:
7070
name: ${{ needs.build.outputs.go-binary-name }}
71-
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
71+
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
7272
with:
7373
name: ${{ needs.build.outputs.go-provenance-name }}
7474
- env:

0 commit comments

Comments
 (0)