Skip to content

Commit

Permalink
Update push-to-docker-hub.yml
Browse files Browse the repository at this point in the history
add image scan
  • Loading branch information
min2ha authored Dec 11, 2023
1 parent f3bcf4f commit af31484
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/push-to-docker-hub.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
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


security:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit af31484

Please sign in to comment.