Skip to content

Commit 402ae0b

Browse files
authored
Merge pull request #1448 from Anselmoo/feature/docker-signing-fix
chore: Update Docker actions to latest versions
2 parents 2cfd905 + c43a011 commit 402ae0b

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

.github/workflows/docker-cd.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: CD - Publish Docker image on ghcr.io
22

3-
# This workflow uses actions that are not certified by GitHub.
4-
# They are provided by a third-party and are governed by
3+
# cos
54
# separate terms of service, privacy policy, and support
65
# documentation.
76

@@ -38,33 +37,39 @@ jobs:
3837

3938
- name: Install Cosign
4039
uses: sigstore/[email protected]
40+
# with:
41+
# cosign-release: 'v2.2.4' # optional
4142

4243
- name: Set up QEMU
43-
uses: docker/setup-qemu-action@v2.2.0
44+
uses: docker/setup-qemu-action@v3.2.0
4445

4546
- name: Set up Docker Buildx
46-
uses: docker/setup-buildx-action@v2.10.0
47+
uses: docker/setup-buildx-action@v3.5.0
4748

4849
- name: Login to GitHub Container Registry
49-
uses: docker/login-action@v2.2.0
50+
uses: docker/login-action@v3.3.0
5051
with:
51-
registry: ghcr.io
52+
registry: ${{ env.REGISTRY }}
5253
username: ${{ github.actor }}
5354
password: ${{ secrets.GITHUB_TOKEN }}
5455

5556
- id: docker_meta
5657
uses: docker/[email protected]
5758
with:
58-
images: ghcr.io/sigstore/sample-honk
59+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
5960
tags: type=sha,format=long
6061

6162
- name: Build and Push container images
62-
uses: docker/build-push-action@v4.2.1
63+
uses: docker/build-push-action@v6.5.0
6364
id: build-and-push
6465
with:
6566
platforms: linux/amd64,linux/arm64
6667
push: true
6768
tags: ${{ steps.docker_meta.outputs.tags }}
69+
labels: ${{ steps.docker_meta.outputs.labels }}
70+
cache-from: type=gha
71+
cache-to: type=gha,mode=max
72+
# outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.description'] }}
6873

6974
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
7075
- name: Sign image with a key

cosign.pub

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-----BEGIN PUBLIC KEY-----
2+
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/6fPQhwVsFvcfGtSFBIwdHbTxkF3
3+
KaNOdpXBpmyrM/y1TM5YgTYl5mVq7km/LPukbXslcrVX1dT5H+FUP6+onQ==
4+
-----END PUBLIC KEY-----

0 commit comments

Comments
 (0)