Skip to content

Commit

Permalink
Skip sbom and vulnscan unless you are root
Browse files Browse the repository at this point in the history
  • Loading branch information
JonZeolla committed Apr 23, 2024
1 parent 1680add commit e834015
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,26 @@ jobs:
ENVIRONMENT: ${{ matrix.environment }}
- name: Generate the SBOM
run: task -v sbom
if: matrix.user == 'root'
env:
TOOL: ${{ matrix.tool }}
ENVIRONMENT: ${{ matrix.environment }}
- name: Upload the SBOM
uses: actions/upload-artifact@v4
if: matrix.user == 'root'
with:
name: SBOM_${{ matrix.tool }}_${{ matrix.environment }}
path: sbom.2*.json
if-no-files-found: error
- name: Generate Vuln scan results
run: task -v vulnscan
if: matrix.user == 'root'
env:
TOOL: ${{ matrix.tool }}
ENVIRONMENT: ${{ matrix.environment }}
- name: Upload Vuln scan result
uses: actions/upload-artifact@v4
if: matrix.user == 'root'
with:
name: Vulns_${{ matrix.tool }}_${{ matrix.environment }}
path: vulns.2*.json
Expand Down

0 comments on commit e834015

Please sign in to comment.