28 lines
884 B
YAML
28 lines
884 B
YAML
name: build
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
- name: Build image
|
|
run: docker build -t geoserver-docker.osgeo.org/geoserver:${{ github.sha }} .
|
|
- name: Run trivy
|
|
uses: aquasecurity/trivy-action@master
|
|
with:
|
|
format: 'sarif'
|
|
ignore-unfixed: true
|
|
image-ref: 'geoserver-docker.osgeo.org/geoserver:${{ github.sha }}'
|
|
output: 'trivy-results.sarif'
|
|
severity: 'CRITICAL,HIGH'
|
|
vuln-type: 'os,library'
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
|
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3
|
|
with:
|
|
sarif_file: 'trivy-results.sarif'
|