Update actions/checkout digest to a5ac7e5 #52
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 Latest Image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-image: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | |
with: | |
submodules: recursive | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Login to Quay.io Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAYIO_USERNAME }} | |
password: ${{ secrets.QUAYIO_TOKEN }} | |
- | |
name: Build Latest Version | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
quay.io/appuio/example-spring-boot:latest | |
- | |
name: Run vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'quay.io/appuio/example-spring-boot:latest' | |
format: 'table' | |
output: 'trivy-results.txt' | |
exit-code: '0' | |
ignore-unfixed: true | |
vuln-type: 'os' | |
severity: 'CRITICAL,HIGH' | |
- | |
name: Archive vulnerability scan results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: trivy-results-build | |
path: trivy-results.txt | |
- | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: 'quay.io/appuio/example-spring-boot:latest' | |
run: echo "hello world" |