-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1448 from Anselmoo/feature/docker-signing-fix
chore: Update Docker actions to latest versions
- Loading branch information
Showing
2 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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----- |