Skip to content

Commit

Permalink
Merge pull request #18 from ale8k/add-suffix-to-output-artifacts
Browse files Browse the repository at this point in the history
add suffix
  • Loading branch information
ale8k authored Oct 8, 2024
2 parents 44fcb78 + 905b465 commit 326f119
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/actions/security-scan-upload/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ inputs:
description: 'Upload the SARIF outputs via actions/upload-artifact'
required: false
default: 'true'
result-suffix:
description: |
A suffix for the resulting upload-artifact.
For example, v3-branch would result in:
trivy-security-scan-results-v3-branch
required: false
default: ''

runs:
using: "composite"
Expand Down Expand Up @@ -52,7 +59,7 @@ runs:
uses: actions/upload-artifact@v4
if: ${{ inputs.upload-sarif-artifact == 'true' }}
with:
name: 'trivy-security-scan-results'
name: trivy-security-scan-results${{ inputs.result-suffix != '' && format('-{0}', inputs.result-suffix) || '' }}
path: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
Expand All @@ -77,7 +84,7 @@ runs:
uses: actions/upload-artifact@v4
if: ${{ inputs.upload-sarif-artifact == 'true' }}
with:
name: 'govuln-security-scan-results'
name: govuln-security-scan-results${{ inputs.result-suffix != '' && format('-{0}', inputs.result-suffix) || '' }}
path: 'govuln-results.sarif'

- name: Upload govuln scan results to GitHub Security tab
Expand Down

0 comments on commit 326f119

Please sign in to comment.