permissions: # least privileges, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
contents: read
actions: read
+ # This is used to complete the identity challenge
+ # with sigstore/fulcio when running outside of PRs.
+ id-token: write
jobs:
prepare:
permissions: # least privileges, see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
contents: read
+ # This is used to complete the identity challenge
+ # with sigstore/fulcio when running outside of PRs.
+ id-token: write
jobs:
validate-push-image:
name: Check only images built from tags and master are pushed
runs-on: ubuntu-24.04
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v4
with:
prepare-runner-os-list:
name: generate list of runner-architecture pairs based on the input "platforms"
runs-on: ubuntu-24.04
+ permissions:
+ contents: read
outputs:
runnerlist: ${{ steps.get-runnerlist.outputs.runnerlist }}
steps:
fail-fast: false
matrix:
platform: ${{ fromJson(needs.prepare-runner-os-list.outputs.runnerlist) }}
+ permissions:
+ contents: read
steps:
- uses: actions/checkout@v4
with:
runs-on: ubuntu-24.04
if: ${{ inputs.push }}
needs: build
+ permissions:
+ contents: read
+ # This is used to complete the identity challenge
+ # with sigstore/fulcio when running outside of PRs.
+ id-token: write
outputs:
image-digest: ${{ steps.get-image-digest.outputs.image-digest }}
env:
INPUT_IMAGE_TAGS: ${{ inputs.image-tags }}
INPUT_PLATFORMS: ${{ inputs.platforms }}
IMAGE_NAME: ${{ secrets.DOCKERHUB_ORGANIZATION_NAME }}/${{ inputs.image-name }}
+ permissions:
+ contents: read
steps:
- name: Check running image
run: |