Skip to content

Commit 303e761

Browse files
author
mkyla
authored
chore: update Docker and release workflows with latest action versions and permissions
1 parent 2b827d8 commit 303e761

2 files changed

Lines changed: 14 additions & 24 deletions

File tree

.github/workflows/docker.yml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,48 @@ on:
77
env:
88
REGISTRY: ghcr.io
99
IMAGE_NAME: ${{ github.repository }}
10-
VERSION: ${{ github.ref_name }}
1110

1211
jobs:
1312
build:
1413
runs-on: ubuntu-latest
1514
permissions:
16-
contents: read
15+
contents: write
1716
packages: write
18-
id-token: write
1917

2018
steps:
2119
- name: Checkout repository
22-
uses: actions/checkout@v5.0.1
20+
uses: actions/checkout@v6.0.2
2321

24-
- name: Install cosign
25-
if: github.event_name != 'pull_request'
26-
uses: sigstore/cosign-installer@v4.0.0
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3.7.0
2724

2825
- name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v3.11.1
26+
uses: docker/setup-buildx-action@v3.12.0
3027

3128
- name: Log into registry ${{ env.REGISTRY }}
32-
if: github.event_name != 'pull_request'
33-
uses: docker/login-action@v3.6.0
29+
uses: docker/login-action@v3.7.0
3430
with:
3531
registry: ${{ env.REGISTRY }}
3632
username: ${{ github.actor }}
3733
password: ${{ secrets.GITHUB_TOKEN }}
3834

3935
- name: Extract Docker metadata
4036
id: meta
41-
uses: docker/metadata-action@v5.9.0
37+
uses: docker/metadata-action@v5.10.0
4238
with:
4339
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4440

4541
- name: Build and push Docker image
4642
id: build-and-push
47-
uses: docker/build-push-action@v6.18.0
43+
uses: docker/build-push-action@v6.19.2
4844
with:
4945
context: .
50-
push: ${{ github.event_name != 'pull_request' }}
46+
push: true
5147
tags: ${{ steps.meta.outputs.tags }}
5248
labels: ${{ steps.meta.outputs.labels }}
5349
cache-from: type=gha
5450
cache-to: type=gha,mode=max
5551
platforms: linux/amd64,linux/arm64
56-
build-args: VERSION=${{ env.VERSION }}
52+
build-args: VERSION=${{ github.ref_name }}
5753
provenance: false
58-
59-
- name: Sign the published Docker image
60-
if: ${{ github.event_name != 'pull_request' }}
61-
env:
62-
TAGS: ${{ steps.meta.outputs.tags }}
63-
DIGEST: ${{ steps.build-and-push.outputs.digest }}
64-
run: echo ${{ steps.meta.outputs.tags }} | tr ',' '\n' | xargs -I {} cosign sign --yes {}@${DIGEST}
54+
sbom: false

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ jobs:
88
goreleaser:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout
12-
uses: actions/checkout@v5.0.1
11+
- name: Checkout repository
12+
uses: actions/checkout@v6.0.2
1313
with:
1414
fetch-depth: 0
1515
- name: Set up Go
1616
uses: actions/setup-go@v6.1.0
1717
with:
18-
go-version: '1.25.6'
18+
go-version: '1.26.1'
1919
- name: Run GoReleaser
2020
uses: goreleaser/goreleaser-action@v6.4.0
2121
with:

0 commit comments

Comments
 (0)