Skip to content

Commit

Permalink
Also do a non-required to merge vuln scan on PRs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Jul 24, 2024
1 parent 6793859 commit b1895aa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/nightly-vuln-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Run nightly vulnerability check
on:
schedule:
- cron: '0 0 * * *'
pull_request:
branches:
- main

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
Expand All @@ -24,10 +27,10 @@ jobs:
image-ref: 'ghcr.io/pulibrary/dpul-collections:main'
format: 'table'
exit-code: '1'
ignore-unfixed: true
ignore-unfixed: ${{ github.event_name != 'pull_request' }}
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
output: 'vulnerabilities.table'
output: ${{ github.event_name != 'pull_request' && 'vulnerabilities.table' }}
- name: Set variables
id: scanner
run: |
Expand All @@ -42,7 +45,7 @@ jobs:
SCANNER_OUTPUTS: ${{ steps.scanner.outputs.results }}
run: echo "${{ env.SCANNER_OUTPUTS }}"
- name: Create issue
if: job.steps.runscanner.status == failure()
if: job.steps.runscanner.status == failure() && github.event_name != 'pull_request'
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit b1895aa

Please sign in to comment.