Skip to content

Commit

Permalink
Wip: pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
containerscrew committed Aug 13, 2024
1 parent 9f4376f commit 79f6513
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ env:

jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
Expand Down Expand Up @@ -96,21 +97,25 @@ jobs:
with:
platforms: linux/amd64,linux/arm64
push: false
tags: test/test:latest

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{env.REPOSITORY}}:${{env.IMAGE_TAG}}'
format: 'sarif'
output: 'trivy-results.sarif'
vuln-type: 'os,library'
ignore-unfixed: false
env:
TRIVY_USERNAME: ${{ secrets.DOCKERHUB_AUTH_USERNAME }}
TRIVY_PASSWORD: ${{ secrets.DOCKERHUB_AUTH_TOKEN }}

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
tags: ${{ env.REPOSITORY }}:latest,${{ env.REPOSITORY }}:${{ env.IMAGE_TAG }}
sec:
name: sec
runs-on: ubuntu-latest
needs: build
steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: '${{env.REPOSITORY}}:${{env.IMAGE_TAG}}'
format: 'sarif'
output: 'trivy-results.sarif'
vuln-type: 'os,library'
ignore-unfixed: false
env:
TRIVY_USERNAME: ${{ secrets.DOCKERHUB_AUTH_USERNAME }}
TRIVY_PASSWORD: ${{ secrets.DOCKERHUB_AUTH_TOKEN }}

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: 'trivy-results.sarif'
2 changes: 2 additions & 0 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Hadolint 👀

on:
push:
paths:
- Dockerfile
branches:
- '*'
tags:
Expand Down

0 comments on commit 79f6513

Please sign in to comment.