-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 2.99 KB
/
anchore-scan.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
name: Anchore scan
on:
push:
branches:
- main
- master
paths-ignore:
- "python/**"
workflow_dispatch:
jobs:
designer-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker compose pull designer
run: docker pull ghcr.io/communitiesuk/funding-service-design-form-designer-adapter:latest
- name: Docker layer caching
uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true
with:
# Layers are cached by keys
# docker-layer-caching action has an issue which causes layers to dangle,
# and this will eventually build up and increase pull time significantly
# see https://github.com/satackey/action-docker-layer-caching/issues/55
# ATM solution is to change keys periodically to avoid the dangling layers
# for that just increase the number you see in key and restore-keys below (same number in both keys).
key: digital-form-builder-adapter-2-{hash}
restore-keys: |
digital-form-builder-adapter-2
- name: Scan image
uses: anchore/scan-action@v2
with:
image: "ghcr.io/communitiesuk/funding-service-design-form-designer-adapter:latest"
fail-build: false
severity-cutoff: critical
- name: Upload artifact
uses: actions/upload-artifact@v4.4.3
if: ${{ success() || failure() }}
with:
name: AnchoreReports-Designer
path: vulnerabilities.json
runner-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker compose pull runner
run: docker pull ghcr.io/communitiesuk/funding-service-design-form-runner-adapter:latest
- name: Docker layer caching
uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true
with:
# Layers are cached by keys
# docker-layer-caching action has an issue which causes layers to dangle,
# and this will eventually build up and increase pull time significantly
# see https://github.com/satackey/action-docker-layer-caching/issues/55
# ATM solution is to change keys periodically to avoid the dangling layers
# for that just increase the number you see in key and restore-keys below (same number in both keys).
key: digital-form-builder-2-{hash}
restore-keys: |
digital-form-builder-2
- name: Scan image
uses: anchore/scan-action@v2
with:
image: "ghcr.io/communitiesuk/funding-service-design-form-runner-adapter:latest"
acs-report-enable: true
fail-build: false
severity-cutoff: critical
- name: Upload artifact
uses: actions/upload-artifact@v4.4.2
if: ${{ success() || failure() }}
with:
name: AnchoreReports-Runner
path: vulnerabilities.json