Skip to content

Commit

Permalink
ci: allow setting the image tag to scan
Browse files Browse the repository at this point in the history
  • Loading branch information
chgl committed Nov 5, 2023
1 parent f35ef9c commit 497b00a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ jobs:
security-events: write
with:
image: ghcr.io/miracum/github-reusable-workflow
image-tag: master
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/standard-schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
required: false
default: "ghcr.io/${{ github.repository }}"
type: string
image-tag:
description: "The image tag to scan with trivy"
required: false
default: "latest"
type: string
secrets:
github-token:
description: "The GitHub workflow token used to push to ghcr.io. Also used by MegaLinter"
Expand Down Expand Up @@ -71,7 +76,7 @@ jobs:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@f78e9ecf42a1271402d4f484518b9313235990e1 # 0.13.1
with:
image-ref: "${{ inputs.image }}:latest"
image-ref: "${{ inputs.image }}:${{ inputs.image-tag }}"
format: "template"
template: "@/contrib/sarif.tpl"
output: "trivy-results.sarif"
Expand Down

0 comments on commit 497b00a

Please sign in to comment.