Skip to content

Commit aaa838d

Browse files
committed
ci: Upgrade release pipeline actions
1 parent 21329c8 commit aaa838d

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ on:
44
push:
55
tags: [ "v*" ]
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
attestations: write
11+
712
jobs:
813
artifact-builder:
914
name: "Prepare release artifacts"
@@ -45,33 +50,37 @@ jobs:
4550
name: maddy-binary.tar.zst
4651
path: '~/maddy-x86_64-linux-musl.tar.zst'
4752
if-no-files-found: error
53+
- name: "Generate artifact attestation"
54+
uses: actions/attest-build-provenance@v2
55+
with:
56+
subject-path: '~/maddy-x86_64-linux-musl.tar.zst'
4857
docker-builder:
4958
name: "Build & push Docker image"
5059
if: github.ref_type == 'tag'
5160
runs-on: ubuntu-latest
5261
steps:
5362
- name: Checkout
54-
uses: actions/checkout@v2
63+
uses: actions/checkout@v4
5564
- name: "Set up QEMU"
5665
uses: docker/setup-qemu-action@v1
5766
with:
5867
platforms: arm64
5968
- name: "Set up Docker Buildx"
6069
id: buildx
61-
uses: docker/setup-buildx-action@v1
70+
uses: docker/setup-buildx-action@v3
6271
- name: "Login to Docker Hub"
63-
uses: docker/login-action@v1
72+
uses: docker/login-action@v3
6473
with:
6574
username: ${{ secrets.DOCKERHUB_USERNAME }}
6675
password: ${{ secrets.DOCKERHUB_PASSWORD }}
6776
- name: "Login to GitHub Container Registry"
68-
uses: docker/login-action@v1
77+
uses: docker/login-action@v3
6978
with:
7079
registry: "ghcr.io"
7180
username: ${{ github.repository_owner }}
7281
password: ${{ secrets.GITHUB_TOKEN }}
7382
- name: "Generate container metadata"
74-
uses: docker/metadata-action@v4
83+
uses: docker/metadata-action@v5
7584
id: meta
7685
with:
7786
images: |
@@ -85,11 +94,19 @@ jobs:
8594
org.opencontainers.image.documentation=https://maddy.email/docker/
8695
org.opencontainers.image.url=https://maddy.email
8796
- name: "Build and push"
88-
uses: docker/build-push-action@v2
97+
uses: docker/build-push-action@v6
98+
id: docker
8999
with:
90100
context: .
91101
platforms: linux/amd64,linux/arm64
92102
file: Dockerfile
93103
push: true
94104
tags: ${{ steps.meta.outputs.tags }}
95105
labels: ${{ steps.meta.outputs.labels }}
106+
- name: "Generate container attestation"
107+
uses: actions/attest-build-provenance@v2
108+
with:
109+
subject-name: ghcr.io/foxcpp/maddy
110+
subject-digest: ${{ steps.docker.outputs.digest }}
111+
push-to-registry: true
112+

0 commit comments

Comments
 (0)