File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 4
4
types : [published]
5
5
6
6
jobs :
7
-
8
7
docker :
9
-
8
+ permissions :
9
+ contents : read # for actions/checkout to fetch code
10
+ security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
10
11
runs-on : ubuntu-latest
11
-
12
12
steps :
13
-
14
13
- name : Checkout
15
14
uses : actions/checkout@v2
16
-
17
15
- name : Set up Docker Buildx
18
16
uses : docker/setup-buildx-action@v1
19
-
20
17
- name : Login to Github Container Registry
21
18
uses : docker/login-action@v1
22
19
with :
23
20
username : ${{ github.actor }}
24
21
password : ${{ secrets.GITHUB_TOKEN }}
25
22
registry : ghcr.io
26
-
27
23
- name : Set tag name
28
24
id : tag
29
25
run : echo ::set-output name=tag_name::${GITHUB_REF#*\/*\/}
30
26
env :
31
27
GITHUB_REF : ${{ github.ref }}
32
-
33
28
- name : Build and push
34
29
uses : docker/build-push-action@v2
35
30
with :
@@ -41,14 +36,12 @@ jobs:
41
36
ghcr.io/artefactory/github_tests_validator_app:latest
42
37
cache-from : type=registry,ref=ghcr.io/artefactory/github_tests_validator_app:latest
43
38
cache-to : type=inline
44
-
45
39
- name : Scan image
46
40
uses : anchore/scan-action@v3
47
41
id : scan
48
42
with :
49
43
image : " ghcr.io/artefactory/github_tests_validator_app:${{ steps.tag.outputs.tag_name }}"
50
44
severity-cutoff : " low"
51
-
52
45
- name : upload Anchore scan SARIF report
53
46
if : success() || failure()
54
47
uses : github/codeql-action/upload-sarif@v2
You can’t perform that action at this time.
0 commit comments