Skip to content
Snippets Groups Projects
Unverified Commit 9ee3db1d authored by Gaël Goinvic's avatar Gaël Goinvic Committed by GitHub
Browse files

Implement cosign on docker image (#16774)


Signed-off-by: default avatarGaël Goinvic <gaelg@element.io>
parent 25b3ba53
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ on:
permissions:
contents: read
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token
jobs:
build:
runs-on: ubuntu-latest
......@@ -29,6 +29,9 @@ jobs:
- name: Inspect builder
run: docker buildx inspect
- name: Install Cosign
uses: sigstore/cosign-installer@v3.3.0
- name: Checkout repository
uses: actions/checkout@v4
......@@ -68,6 +71,7 @@ jobs:
type=pep440,pattern={{raw}}
- name: Build and push all platforms
id: build-and-push
uses: docker/build-push-action@v5
with:
push: true
......@@ -82,3 +86,14 @@ jobs:
# https://github.com/rust-lang/cargo/issues/10583
build-args: |
CARGO_NET_GIT_FETCH_WITH_CLI=true
- name: Sign the images with GitHub OIDC Token
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
TAGS: ${{ steps.set-tag.outputs.tags }}
run: |
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}
Sign the published docker image using [cosign](https://docs.sigstore.dev/).
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment