Fix ghcr.io buildx command in tag workflow #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Vuln Scan | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Run Trivy vulnerability scanner in fs mode | |
uses: aquasecurity/trivy-action@0.20.0 | |
with: | |
scan-type: 'fs' | |
scan-ref: '.' | |
severity: 'CRITICAL,HIGH' | |
exit-code: '1' | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@master | |
- name: Build an image from Dockerfile | |
run: | | |
docker build -t yeetfile:${{ github.sha }} . | |
- name: Run Trivy vulnerability scanner for docker image | |
uses: aquasecurity/trivy-action@0.20.0 | |
with: | |
image-ref: 'yeetfile:${{ github.sha }}' | |
exit-code: '1' | |
severity: 'CRITICAL,HIGH' |