Skip to content

bypass trivy vuln on Critical,High #19

bypass trivy vuln on Critical,High

bypass trivy vuln on Critical,High #19

name: Docker
on:
push:
branches: ["master"]
jobs:
build:
name: Build & puch docker image
runs-on: ubuntu-latest
env:
IMG_NAME: ${{ github.repository }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker image
run: docker build -t docker.io/${{ github.repository }}:0.0.3 . # change version
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'docker.io/${{ github.repository }}:0.0.3' # change version
format: 'table'
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: '${{ github.repository }}:0.0.3' # change version