Skip to content

Commit

Permalink
Merge pull request #1448 from Anselmoo/feature/docker-signing-fix
Browse files Browse the repository at this point in the history
chore: Update Docker actions to latest versions
  • Loading branch information
Anselmoo authored Jul 28, 2024
2 parents 2cfd905 + c43a011 commit 402ae0b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/docker-cd.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: CD - Publish Docker image on ghcr.io

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

Expand Down Expand Up @@ -38,33 +37,39 @@ jobs:

- name: Install Cosign
uses: sigstore/[email protected]
# with:
# cosign-release: 'v2.2.4' # optional

- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0
uses: docker/setup-qemu-action@v3.2.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.10.0
uses: docker/setup-buildx-action@v3.5.0

- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

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

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

# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
- name: Sign image with a key
Expand Down
4 changes: 4 additions & 0 deletions cosign.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/6fPQhwVsFvcfGtSFBIwdHbTxkF3
KaNOdpXBpmyrM/y1TM5YgTYl5mVq7km/LPukbXslcrVX1dT5H+FUP6+onQ==
-----END PUBLIC KEY-----

0 comments on commit 402ae0b

Please sign in to comment.