Skip to content

Commit df7b950

Browse files
committed
Enable cosign and test multiple tags
1 parent ae47571 commit df7b950

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

.github/workflows/ci-pipeline.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ jobs:
229229
# generate Docker tags based on the following events/attributes
230230
tags: |
231231
type=sha
232+
type=sha,suffix=-test
232233
# type=raw,value={{branch}}-latest
233234
# type=raw,value={{branch}}-{{date 'YYYYMMDDHHmmss'}}
234235

@@ -242,23 +243,23 @@ jobs:
242243
run: |
243244
docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.REGISTRY_PATH }}/${{ env.IMAGE_NAME }}-${{ matrix.docker_target }}:${{ steps.meta.outputs.version }}
244245
245-
# #TODO: Implement signature using generated key: https://docs.sigstore.dev/signing/quickstart/#signing-with-a-generated-key
246-
#
247-
# # Sign the resulting Docker image digest except on PRs.
248-
# # This will only write to the public Rekor transparency log when the Docker
249-
# # repository is public to avoid leaking data. If you would like to publish
250-
# # transparency data even for private images, pass --force to cosign below.
251-
# # https://github.com/sigstore/cosign
252-
# - name: Sign the published Docker image using GitHub OIDC Token
253-
# env:
254-
# # https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
255-
# TAGS: ${{ steps.meta.outputs.tags }}
256-
# DIGEST: ${{ steps.build-and-push.outputs.digest }}
257-
# # This step uses the identity token to provision an ephemeral certificate
258-
# # against the sigstore community Fulcio instance.
259-
# run: |
260-
# images=""
261-
# for tag in ${TAGS}; do
262-
# images+="${tag}@${DIGEST} "
263-
# done
264-
# cosign sign --yes ${images}
246+
#TODO: Implement signature using generated key: https://docs.sigstore.dev/signing/quickstart/#signing-with-a-generated-key
247+
248+
# Sign the resulting Docker image digest except on PRs.
249+
# This will only write to the public Rekor transparency log when the Docker
250+
# repository is public to avoid leaking data. If you would like to publish
251+
# transparency data even for private images, pass --force to cosign below.
252+
# https://github.com/sigstore/cosign
253+
- name: Sign the published Docker image using GitHub OIDC Token
254+
env:
255+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
256+
TAGS: ${{ steps.meta.outputs.tags }}
257+
DIGEST: ${{ steps.build-and-push.outputs.digest }}
258+
# This step uses the identity token to provision an ephemeral certificate
259+
# against the sigstore community Fulcio instance.
260+
run: |
261+
images=""
262+
for tag in ${TAGS}; do
263+
images+="${tag}@${DIGEST} "
264+
done
265+
cosign sign --yes ${images}

0 commit comments

Comments
 (0)