Skip to content

Commit

Permalink
Build container only on release
Browse files Browse the repository at this point in the history
  • Loading branch information
micxer committed May 24, 2023
1 parent 37bb050 commit dd4608e
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: Container

on:
push:
# Publish `main` as Docker `latest` image.
branches:
- main
- master
release:
# push:
# # Publish `main` as Docker `latest` image.
# branches:
# - main
# - master

# Publish `v1.2.3` tags as releases.
tags:
- '**' # All tags kick off a new container build Save history ad 5.0.x etc
# # Publish `v1.2.3` tags as releases.
# tags:
# - '**' # All tags kick off a new container build Save history ad 5.0.x etc

# Run tests for any PRs.
pull_request:
Expand Down Expand Up @@ -154,13 +155,13 @@ jobs:
uses: aquasecurity/trivy-action@master
with:
image-ref: "${{ needs.prepare.outputs.DOCKER_REPOSITORY }}:${{ github.sha }}"
format: 'template'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'MEDIUM,HIGH,CRITICAL'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
Expand Down

0 comments on commit dd4608e

Please sign in to comment.