-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (40 loc) · 1.24 KB
/
build_and_scan_images.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
name: Build and scan OCI images
on:
schedule:
# every day at 1:12AM UTC
- cron: '12 1 * * *'
jobs:
build-scan:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install requirements for image building
run: |
./install-tools.sh
working-directory: image-definitions
- name: Pull remote files and apply patches
run: |
./setup.sh .
./check-update.sh || true
./apply-patches.sh
working-directory: image-definitions
- name: Build and scan for vulnerabilities
run: |
./build-scan.sh
working-directory: image-definitions
- name: Send vulnerability records
run: |
./send-scan.sh ./trivy-reports ${{ secrets.JIRA_TOKEN }}
working-directory: image-definitions
- name: Prepare artifacts
run: |
tar zcvf trivy-reports-${{ strategy.job-index }}.tar.gz ./trivy-reports
working-directory: image-definitions
- name: Upload Trivy reports
uses: actions/upload-artifact@v3
with:
name: trivy-reports
path: image-definitions/trivy-reports-${{ strategy.job-index }}.tar.gz