Skip to content

Commit

Permalink
Add attestation
Browse files Browse the repository at this point in the history
  • Loading branch information
vokomarov committed Nov 15, 2024
1 parent 640afd9 commit 757119c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
types: [ published ]

env:
REGISTRY: docker.io
REPO: cashtrack/website

jobs:
Expand All @@ -14,6 +15,8 @@ jobs:
permissions:
contents: read
packages: write
id-token: write
attestations: write

steps:
- name: Checkout repository
Expand Down Expand Up @@ -41,8 +44,8 @@ jobs:
type=sha
type=semver,pattern={{version}}
# Setup BuildX
# https://github.com/docker/setup-buildx-action
# Setup BuildX
# https://github.com/docker/setup-buildx-action
- name: Setup BuildX
uses: docker/setup-buildx-action@v3
id: buildx
Expand All @@ -53,8 +56,17 @@ jobs:
# https://github.com/docker/build-push-action
- name: Build and push
uses: docker/build-push-action@v6
id: push
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Attest
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ${{ env.REGISTRY }}/${{ env.REPO }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true

0 comments on commit 757119c

Please sign in to comment.