-
Notifications
You must be signed in to change notification settings - Fork 96
39 lines (30 loc) · 1.04 KB
/
pr-cve-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
name: HMDA PR CVE Scan
on:
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up docker build
uses: docker/setup-buildx-action@v3
- name: Build image of hmda platform only
run: |
sbt "project hmda-platform" dockerPublishLocalSkipTests
continue-on-error: true
- name: Tag docker image
run: docker tag $(docker images --filter=reference="hmda/hmda-platform:latest" --format "{{.ID}}") hmda-cve/hmda-platform:pr-cve-scan
- name: Login to Docker Hub
uses: docker/login-action@v3
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Check image for CVEs
uses: docker/scout-action@v1
with:
command: cves
image: hmda-cve/hmda-platform:pr-cve-scan
- name: Remove docker image
run: |
docker rmi hmda-cve/hmda-platform:pr-cve-scan