Show only fixable vulnerabilities #21
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: build-and-scan | |
on: | |
workflow_dispatch: | |
push: | |
env: | |
REGISTRY_USER: aborys | |
IMAGE_REGISTRY: docker.io | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
strategy: | |
matrix: | |
flavor: [rocky, rocky-minimal] | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
permissions: | |
# required for all workflows | |
security-events: write | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Build ${{ matrix.flavor }} image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: podman-builder | |
tags: latest-${{ matrix.flavor }} ${{ github.sha }}-${{ matrix.flavor }} ${{ startsWith(github.ref, 'refs/tags') && format('{0}-{1}', github.ref_name, matrix.flavor) || '' }} | |
containerfiles: | | |
./Containerfile.${{ matrix.flavor }} | |
platforms: linux/amd64, linux/arm64 | |
- name: Scan SBOM | |
id: scan | |
uses: anchore/scan-action@v3 | |
with: | |
image: podman:podman-builder:latest-${{ matrix.flavor }} | |
fail-build: false | |
only-fixed: true | |
- name: upload Anchore scan SARIF report | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{ steps.scan.outputs.sarif }} |