Skip to content

Commit

Permalink
fix attempt to use dynamic secure-uplaod-artifact
Browse files Browse the repository at this point in the history
Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com>
  • Loading branch information
ramonpetgrave64 committed Mar 8, 2024
1 parent 55d2415 commit 90909d4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/actions/secure-upload-folder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ inputs:
path:
description: 'Path to the folder'
required: true
repo:
description: 'repo of secure-upload-artifact to use'
required: false
default: 'slsa-framework/slsa-github-generator'
ref:
description: 'ref of secure-upload-artifact to use'
required: false
default: 'main'
outputs:
sha256:
description: "SHA256 of the uploaded tarball."
Expand Down Expand Up @@ -60,7 +68,7 @@ runs:
- name: Upload the artifact
id: upload
uses: slsa-framework/slsa-github-generator/.github/actions/secure-upload-artifact@main
uses: "${{ inputs.repo }}.github/actions/secure-upload-artifact@${{ inputs.ref }}"
with:
name: "${{ inputs.name }}"
path: "${{ steps.create.outputs.tarball-path }}"
3 changes: 3 additions & 0 deletions .github/workflows/pre-submit.actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,16 @@ jobs:
with:
name: "${{ env.ARTIFACT_NAME }}"
path: "${{ env.UPLOAD_FOLDER_NAME }}"
repo:

Check failure on line 263 in .github/workflows/pre-submit.actions.yml

View workflow job for this annotation

GitHub Actions / yamllint

263:16 [trailing-spaces] trailing spaces

- name: Upload
id: upload-noroot
uses: ./.github/actions/secure-upload-folder
with:
name: "${{ env.ARTIFACT_NO_ROOT_NAME }}"
path: "${{ env.UPLOAD_FOLDER_NO_ROOT_NAME }}"
repo: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

- name: Download in new folder
uses: ./.github/actions/secure-download-folder
Expand Down

0 comments on commit 90909d4

Please sign in to comment.