-
Notifications
You must be signed in to change notification settings - Fork 44
49 lines (46 loc) · 1.39 KB
/
periodic-scanner-quay.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
name: (cron job) Fetch security scan results from quay
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions: read-all
jobs:
build-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Fetch results
id: fetch-results
run: |
./ci/images/vulnerability-scan/scan.sh | tee /tmp/vulnerability-scan.log
echo "VULNERABILITIES_EXIST=$(tail -1 /tmp/vulnerability-scan.log)" >> $GITHUB_OUTPUT
env:
AUTH_BEARER_TOKEN: ${{ secrets.AUTH_BEARER_TOKEN }}
images: (
"access-setup"
"ci-runner"
"cluster-setup"
"dependencies-update"
"devenv"
"e2e-test-runner"
"quay-upload"
"static-checks"
"update-pipeline-service"
"vulnerability-scan"
)
quay_url: "https://quay.io/api/v1/repository/redhat-pipeline-service"
- name: Check results
id: check-results
if: always()
run: |
res=(${{ steps.fetch-results.outputs.VULNERABILITIES_EXIST }})
if [[ "${res[*]}" =~ "1" ]];then
echo "Vulnerabilities found. Please check the fetch-results step for further details."
exit 1
else
echo "No Vulnerabilities found"
fi