Skip to content

Commit

Permalink
Try auto-closer
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Jul 25, 2024
1 parent b294fd5 commit c6b7d1d
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/nightly-vuln-scanning.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Run nightly vulnerability check

on:
push:
branches:
- main
- container-vuln-scanner
schedule:
- cron: '0 0 * * *'

Expand All @@ -21,7 +25,7 @@ jobs:
id: runscanner
continue-on-error: true
with:
image-ref: 'ghcr.io/pulibrary/dpul-collections:main'
image-ref: 'ghcr.io/pulibrary/dpul-collections:pr-51'
format: 'table'
exit-code: '1'
ignore-unfixed: true
Expand All @@ -44,7 +48,7 @@ jobs:
SCANNER_OUTPUTS: ${{ steps.scanner.outputs.results }}
run: echo "${{ env.SCANNER_OUTPUTS }}"
- name: Create issue
if: job.steps.runscanner.status == failure()
if: steps.runscanner.outcome != 'success'
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -53,3 +57,13 @@ jobs:
with:
filename: .github/failed-vuln-check.md
update_existing: true
- name: Find existing security issue
id: issues
if: steps.runscanner.outcome == 'success'
uses: lee-dohm/select-matching-issues@v1
with:
query: 'Container Vulnerability Scanner Failed is:open '
token: ${{ secrets.GITHUB_TOKEN }}
- name: Close found issues
if: steps.runscanner.outcome == 'success'
run: cat ${{ steps.bugs.outputs.path }} | xargs gh issue close -c 'Container Scan Passing on Merge to Main'

0 comments on commit c6b7d1d

Please sign in to comment.