with
and secrets
jobs:
call-docker-build:
name: Call Docker Build
uses: bretfisher/docker-build-workflow/.github/workflows/reusable-docker-build.yaml@main
secrets:
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}
with:
dockerhub-enable: true
image-names: ghcr.io/${{ github.repository }}
tag-rules: |
type=ref,event=pr
type=raw,value=gha-${{ github.run_id }}
Reusable workflows accept data via inputs
inputs
array to our reusable workflow on:workflow_call:
event${{ inputs.<input-name> }}
with
and secrets
key:values to our calling workflow<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: string
trivy
action step at bottom - name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.11.2
with:
image-ref: ${{ inputs.image }}