Skip to content

Commit 09ac271

Browse files
Update cd.yml
1 parent e176653 commit 09ac271

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

.github/workflows/cd.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,27 @@ on:
44
types: [published]
55

66
jobs:
7-
87
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
1011
runs-on: ubuntu-latest
11-
1212
steps:
13-
1413
- name: Checkout
1514
uses: actions/checkout@v2
16-
1715
- name: Set up Docker Buildx
1816
uses: docker/setup-buildx-action@v1
19-
2017
- name: Login to Github Container Registry
2118
uses: docker/login-action@v1
2219
with:
2320
username: ${{ github.actor }}
2421
password: ${{ secrets.GITHUB_TOKEN }}
2522
registry: ghcr.io
26-
2723
- name: Set tag name
2824
id: tag
2925
run: echo ::set-output name=tag_name::${GITHUB_REF#*\/*\/}
3026
env:
3127
GITHUB_REF: ${{ github.ref }}
32-
3328
- name: Build and push
3429
uses: docker/build-push-action@v2
3530
with:
@@ -41,14 +36,12 @@ jobs:
4136
ghcr.io/artefactory/github_tests_validator_app:latest
4237
cache-from: type=registry,ref=ghcr.io/artefactory/github_tests_validator_app:latest
4338
cache-to: type=inline
44-
4539
- name: Scan image
4640
uses: anchore/scan-action@v3
4741
id: scan
4842
with:
4943
image: "ghcr.io/artefactory/github_tests_validator_app:${{ steps.tag.outputs.tag_name }}"
5044
severity-cutoff: "low"
51-
5245
- name: upload Anchore scan SARIF report
5346
if: success() || failure()
5447
uses: github/codeql-action/upload-sarif@v2

0 commit comments

Comments
 (0)