Skip to content

Commit

Permalink
Add container scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
kamphuisem committed Jan 9, 2025
1 parent e06636c commit cb0df81
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/delivery.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Delivery

on:
pull_request:
types: [synchronize, opened, reopened]
push:
branches: [ master ]
release:
Expand Down Expand Up @@ -34,10 +36,29 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build container and push to GitHub Container Registry
- name: Build container and export to local Docker
uses: docker/build-push-action@v5
with:
context: .
push: true
load: true
tags: local/yivitube:scan

- name: Scan Image
uses: anchore/scan-action@v3
id: scan
with:
image: local/yivitube:scan
fail-build: true
output-format: sarif

- name: Upload Anchore Scan SARIF Report
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.scan.outputs.sarif }}

- name: Push image to GitHub Container Registry
uses: docker/build-push-action@v5
with:
push: github.event_name != 'pull_request'
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit cb0df81

Please sign in to comment.