forked from ukwa/w3act
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (39 loc) · 1.27 KB
/
push-to-docker-hub.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
name: Workflow for Scala using Snyk
on: push
jobs:
image_scan:
name: Build Image and Run Image Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker
uses: docker-practice/actions-setup-docker@v1
with:
docker_version: '20.10.7'
- name: Build Docker Image
run: docker build -f Dockerfile -t myapp:latest .
# - name: Docker Scout Scan
# run: |
# curl -fsSL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh -o install-scout.sh
# sh install-scout.sh
# docker scout quickview
# docker scout cves
- name: Docker Scout
# You may pin to the exact commit or the version.
# uses: docker/scout-action@b7413c99043c2a9131c0fa39cedaece80f285788
uses: docker/[email protected]
with:
dockerhub-user: ${{ secrets.DOCKER_HUB_USERNAME }}
# Docker Hub PAT
dockerhub-password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
command: quickview,cves
only-severities: critical,high
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/scala@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}