Skip to content

Commit 623469e

Browse files
committed
BN-35 | Fix. Trivy scanning to scan local image
1 parent e2da0dc commit 623469e

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,22 +51,29 @@ jobs:
5151
username: ${{ github.actor }}
5252
password: ${{ secrets.GITHUB_TOKEN }}
5353

54-
- name: Build and push Docker image
54+
- name: Build Docker image
5555
uses: docker/build-push-action@v5
5656
with:
5757
context: .
58-
push: true
59-
tags: ghcr.io/bahnew/clinical-frontend:latest
58+
push: false
59+
load: true
60+
tags: clinical-frontend:local
6061
cache-from: type=gha
6162
cache-to: type=gha,mode=max
6263

6364
- name: Scan Docker image for vulnerabilities
64-
uses: aquasecurity/trivy-action@0.16.1
65+
uses: aquasecurity/trivy-action@0.30.0
6566
with:
66-
image-ref: 'ghcr.io/bahnew/clinical-frontend:latest'
67+
image-ref: 'clinical-frontend:local'
6768
format: 'table'
6869
exit-code: '1'
6970
severity: 'CRITICAL,HIGH'
71+
72+
- name: Tag and push Docker image
73+
run: |
74+
docker tag clinical-frontend:local ghcr.io/bahnew/clinical-frontend:latest
75+
docker push ghcr.io/bahnew/clinical-frontend:latest
76+
7077
7178
- name: Repository Dispatch
7279
run: |

0 commit comments

Comments
 (0)