<org>/actions/.github/workflows/reusable-trivy.yml
inputs lines under the workflow_call: eventon:
workflow_call:
inputs:
image:
description: Image to scan
required: true
type: stringtrivy action step at bottom - name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.11.2
with:
image-ref: ${{ inputs.image }}wordsmith-web workflow PR<org>/wordsmith-web/.github/workflows/call-trivy.yml
<org> to yoursjobs:
scan:
name: Scan
uses: <org>/actions/.github/workflows/reusable-trivy.yml@<pr-branch-name>
with:
image: 'ghcr.io/<org>/wordsmith-web:latest'Commit that and watch the Action run in the wordsmith-web repo
We now have a working reusable workflow
latest We’ll need to ensure our Docker Build creates a unique image tag for each PR commit
Also, we’ll need to wait for Docker Build to finish before trying to scan