-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (104 loc) · 3.74 KB
/
scan-images.yml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Scan Images
on:
workflow_dispatch:
schedule:
- cron: '02 7 * * *'
jobs:
Scan-Images:
runs-on : ubuntu-latest
permissions:
contents: write
pull-requests: write
name : Scan images
steps :
- uses: actions/checkout@v3
name: Checkoout
- name: Cache OpenAF runtime
uses: actions/cache@v3
with:
key : oaf-nightly
path: /tmp/oaf
- name: Restore the trivy databases from cache
run : |
wget https://openaf.io/trivy-db.tgz
docker run --rm -v trivy-db:/volume -v $(pwd):/backup busybox tar xzf /backup/trivy-db.tgz -C /volume
- uses: openaf/ojob-action@v4
name: Check latest
with:
ojob: 'ojob.io/sec/genSecBadge'
args: 'image=nmaguiar/imgutils:latest file=.github/sec-latest.svg reportFile=.github/sec-latest.yaml'
dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Generate sec-latest.md
with:
ojob: 'ojob.io/util/toMDTree'
args: 'inputFile=.github/sec-latest.yaml file=.github/sec-latest.md'
dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Check latest
with:
ojob: 'ojob.io/sec/genSecBadge'
args: 'image=nmaguiar/imgutils:lite file=.github/sec-lite.svg reportFile=.github/sec-lite.yaml'
dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Generate sec-lite.md
with:
ojob: 'ojob.io/util/toMDTree'
args: 'inputFile=.github/sec-lite.yaml file=.github/sec-lite.md'
dist: 'nightly'
# - uses: openaf/ojob-action@v4
# name: Check latest ubi
# with:
# ojob: 'ojob.io/sec/genSecBadge'
# args: 'image=nmaguiar/imgutils:ubi file=.github/sec-ubi-latest.svg reportFile=.github/sec-ubi-latest.yaml'
# dist: 'nightly'
# - uses: openaf/ojob-action@v4
# name: Generate sec-ubi-latest.md
# with:
# ojob: 'ojob.io/util/toMDTree'
# args: 'inputFile=.github/sec-ubi-latest.yaml file=.github/sec-ubi-latest.md'
# dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Check build
with:
ojob: 'ojob.io/sec/genSecBadge'
args: 'image=nmaguiar/imgutils:build file=.github/sec-build.svg reportFile=.github/sec-build.yaml'
dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Generate sec-build.md
with:
ojob: 'ojob.io/util/toMDTree'
args: 'inputFile=.github/sec-build.yaml file=.github/sec-build.md'
dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Check build
with:
ojob: 'ojob.io/sec/genSecBadge'
args: 'image=nmaguiar/imgutils:build-lite file=.github/sec-build-lite.svg reportFile=.github/sec-build-lite.yaml'
dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Generate sec-build.md
with:
ojob: 'ojob.io/util/toMDTree'
args: 'inputFile=.github/sec-build-lite.yaml file=.github/sec-build-lite.md'
dist: 'nightly'
# - uses: openaf/ojob-action@v4
# name: Check build ubi
# with:
# ojob: 'ojob.io/sec/genSecBadge'
# args: 'image=nmaguiar/imgutils:ubi-build file=.github/sec-ubi-build.svg reportFile=.github/sec-ubi-build.yaml'
# dist: 'nightly'
# - uses: openaf/ojob-action@v4
# name: Generate sec-ubi-build.md
# with:
# ojob: 'ojob.io/util/toMDTree'
# args: 'inputFile=.github/sec-ubi-build.yaml file=.github/sec-ubi-build.md'
# dist: 'nightly'
- uses: openaf/ojob-action@v4
name: Update badges
env :
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ojob: 'ojob.io/git/hub/contentIn'
args: 'message="update\ badge\ {{date}}/{{time}}" title="Update\ badge" paths=.github/'
dist: 'nightly'