Currently we show how user can verify signatures using few steps in his workflow: https://github.com/docker/github-builder-experimental/blob/93fe71762869c62a90c1f34ca0edd1bc80cfe9bc/README.md#build-reusable-workflow
build:
uses: docker/github-builder-experimental/.github/workflows/build.yml@mainpermissions:
contents: readid-token: write # for signing attestation manifests with GitHub OIDC Tokenpackages: write # needed to push images to GitHub Container Registrywith:
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}meta-images: name/appmeta-tags: | type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}}build-platforms: linux/amd64,linux/arm64secrets:
registry-auths: | - registry: docker.io username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }}build-verify:
runs-on: ubuntu-latestif: ${{ github.event_name != 'pull_request' }}needs:
- buildsteps:
-
name: Install Cosignuses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0with:
cosign-release: ${{ needs.build.outputs.cosign-version }}
-
name: Login to registryuses: docker/login-action@v3with:
registry: docker.iousername: ${{ vars.DOCKERHUB_USERNAME }}password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Verify signaturesuses: actions/github-script@v8env:
INPUT_COSIGN-VERIFY-COMMANDS: ${{ needs.build.outputs.cosign-verify-commands }}with:
script: | for (const cmd of core.getMultilineInput('cosign-verify-commands')) { await exec.exec(cmd); }Or as done in our test workflow:
It would be better to provide a reusable workflow for such case like:
build:
uses: docker/github-builder-experimental/.github/workflows/build.yml@mainpermissions:
contents: readid-token: write # for signing attestation manifests with GitHub OIDC Tokenpackages: write # needed to push images to GitHub Container Registrywith:
output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}meta-images: name/appmeta-tags: | type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}}build-platforms: linux/amd64,linux/arm64secrets:
registry-auths: | - registry: docker.io username: ${{ vars.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }}build-verify:
if: ${{ github.event_name != 'pull_request' }}uses: docker/github-builder-experimental/.github/workflows/verify.yml@mainwith:
build-outputs: ${{ toJSON(needs.build.outputs) }}
Currently we show how user can verify signatures using few steps in his workflow: https://github.com/docker/github-builder-experimental/blob/93fe71762869c62a90c1f34ca0edd1bc80cfe9bc/README.md#build-reusable-workflow
Or as done in our test workflow:
It would be better to provide a reusable workflow for such case like: