Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ on:

jobs:
build:
permissions:
id-token: write
packages: write
attestations: write
contents: read
env:
REGISTRY_LOGIN: "${{ secrets.REGISTRY_LOGIN || github.repository_owner }}"
REGISTRY_PASSWORD: "${{ secrets.REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}"
Expand All @@ -86,6 +91,7 @@ jobs:

- name: Build and push ${{ inputs.name }} image
uses: docker/build-push-action@v5
id: push
with:
context: ${{ inputs.context }}
provenance: ${{ inputs.provenance }}
Expand All @@ -98,3 +104,10 @@ jobs:
build-args: ${{ inputs.build-args }}
file: ${{ env.FILE }}
secrets: ${{ inputs.secrets }}

- name: Attest image
uses: github-early-access/generate-build-provenance@main
with:
subject-name: ${{ inputs.registry }}/${{ inputs.namespace }}/${{ inputs.name }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ permissions:
contents: read
security-events: write
pull-requests: write
attestations: write
id-token: write

jobs:
docker-build:
Expand Down