Skip to content

Commit 70f3557

Browse files
authored
Use latest cosign action to fix signing issue on docker publish (#1613)
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
1 parent edc1a4f commit 70f3557

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

.github/workflows/docker-publish.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,15 @@ jobs:
3636
uses: actions/checkout@v2
3737

3838

39-
# Install the cosign tool except on PR
39+
# Install the cosign tool (not used on PR, still installed)
4040
# https://github.com/sigstore/cosign-installer
4141
- name: Install cosign
42-
if: github.event_name != 'pull_request'
43-
uses: sigstore/cosign-installer@v1.4.1
42+
uses: sigstore/cosign-installer@main
4443
with:
45-
cosign-release: 'v1.4.1'
44+
cosign-release: 'v2.2.3'
45+
46+
- name: Check cosign version
47+
run: cosign version
4648

4749

4850
# Workaround: https://github.com/docker/build-push-action/issues/461
@@ -88,8 +90,11 @@ jobs:
8890
# https://github.com/sigstore/cosign
8991
- name: Sign the published Docker image
9092
if: ${{ github.event_name != 'pull_request' }}
91-
env:
92-
COSIGN_EXPERIMENTAL: "true"
9393
# This step uses the identity token to provision an ephemeral certificate
9494
# against the sigstore community Fulcio instance.
95-
run: cosign sign ${{ steps.meta.outputs.tags }}@${{ steps.build-and-push.outputs.digest }}
95+
run: cosign sign --yes ${TAGS}
96+
env:
97+
TAGS: ${{ steps.meta.outputs.tags }}
98+
# should use @${{ steps.build-and-push.outputs.digest }}
99+
# but that leads to "entity not found in registry"
100+
COSIGN_EXPERIMENTAL: "true"

0 commit comments

Comments
 (0)