Skip to content

Commit

Permalink
added support for attestation of docker images closes #146
Browse files Browse the repository at this point in the history
  • Loading branch information
infinityofspace committed Sep 27, 2024
1 parent b7dda67 commit ec36a97
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/docker-publish-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
contents: read
attestations: write

steps:
- name: checkout code
uses: actions/checkout@v4
Expand All @@ -33,6 +39,7 @@ jobs:
password: ${{ secrets.GH_TOKEN }}

- name: Build and push
id: build-push
uses: docker/build-push-action@v6
with:
push: true
Expand All @@ -42,3 +49,10 @@ jobs:
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Attest
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ghcr.io/${{ secrets.GH_USERNAME }}/certbot_dns_duckdns
subject-digest: ${{ steps.build-push.outputs.digest }}
push-to-registry: true
14 changes: 14 additions & 0 deletions .github/workflows/docker-publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
contents: read
attestations: write

steps:
- name: get the tag name
id: get_tag
Expand Down Expand Up @@ -37,6 +43,7 @@ jobs:
password: ${{ secrets.GH_TOKEN }}

- name: Build and push
id: build-push
uses: docker/build-push-action@v6
with:
push: true
Expand All @@ -50,3 +57,10 @@ jobs:
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Attest
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ghcr.io/${{ secrets.GH_USERNAME }}/certbot_dns_duckdns
subject-digest: ${{ steps.build-push.outputs.digest }}
push-to-registry: true
14 changes: 14 additions & 0 deletions .github/workflows/docker-publish-unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
packages: write
contents: read
attestations: write

steps:
- name: checkout code
uses: actions/checkout@v4
Expand All @@ -33,6 +39,7 @@ jobs:
password: ${{ secrets.GH_TOKEN }}

- name: Build and push
id: build-push
uses: docker/build-push-action@v6
with:
push: true
Expand All @@ -42,3 +49,10 @@ jobs:
platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Attest
uses: actions/attest-build-provenance@v1
id: attest
with:
subject-name: ghcr.io/${{ secrets.GH_USERNAME }}/certbot_dns_duckdns
subject-digest: ${{ steps.build-push.outputs.digest }}
push-to-registry: true

0 comments on commit ec36a97

Please sign in to comment.