Docker Image CI #28
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: Docker Image CI | |
on: | |
schedule: | |
- cron: "0 1 * * 1" | |
push: | |
branches: [ "main" ] | |
jobs: | |
build-3_5: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push v3.5 | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./3.5 | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/lat-lon/deegree3-containers:3.5.6,ghcr.io/lat-lon/deegree3-containers:3.5,ghcr.io/lat-lon/deegree3-containers:latest | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
image-ref: 'ghcr.io/lat-lon/deegree3-containers:3.5.6' | |
format: 'sarif' | |
severity: 'CRITICAL' | |
output: 'trivy-results.sarif' | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v3 | |
if: always() | |
with: | |
sarif_file: 'trivy-results.sarif' |