Skip to content

Commit 2e4fb99

Browse files
authored
Add optional ARTIFACT_NAME_SUFFIX input to Trivy workflow and update artifact naming (#1357)
1 parent c921be9 commit 2e4fb99

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/docker_build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
IMAGE_NAME: rebuild-image:local
6666
TARFILE_NAME: ${{ needs.build.outputs.tarfile_artifact }}
6767
EXIT_CODE: 1
68+
ARTIFACT_NAME_SUFFIX: -rebuild
6869
permissions:
6970
contents: read
7071
security-events: write

.github/workflows/trivy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
required: false
2525
type: number
2626
default: 0
27+
ARTIFACT_NAME_SUFFIX: # optional suffix to disambiguate artifact names when this workflow is called multiple times in the same run
28+
required: false
29+
type: string
30+
default: ""
2731
outputs:
2832
trivy_conclusion:
2933
description: "The pass/fail status from Trivy"
@@ -84,7 +88,7 @@ jobs:
8488
uses: actions/upload-artifact@v4
8589
if: ${{ !cancelled() }}
8690
with:
87-
name: ${{ env.sarif_file_name }}
91+
name: ${{ env.sarif_file_name }}${{ inputs.ARTIFACT_NAME_SUFFIX }}
8892
path: ${{ env.sarif_file_name }}
8993

9094
outputs:

0 commit comments

Comments
 (0)