Skip to content

Commit 892b89d

Browse files
committed
[action] get docker image digest for cosign
1 parent 0153a8c commit 892b89d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ docker-make:
197197
# appropriate tags.
198198
#################################################
199199

200+
DOCKER_IMAGE=smallstep/step-sds
201+
200202
DOCKER_TAG=docker tag smallstep/$(1):latest smallstep/$(1):$(2)
201203

202204
define DOCKER_PUSH
@@ -210,7 +212,9 @@ docker-tag:
210212

211213
docker-push-tag: docker-tag
212214
$(call DOCKER_PUSH,step-sds,$(VERSION))
213-
cosign sign -r smallstep/step-sds
215+
DIGEST=$(docker images --digests --format "{{.Digest}}" ${DOCKER_IMAGE})
216+
DIGEST=$(echo ${DIGEST} | tr -d '[:space:]')
217+
cosign sign -r ${DOCKER_IMAGE}@${DIGEST}
214218

215219
docker-push-tag-latest:
216220
$(call DOCKER_PUSH,step-sds,latest)

0 commit comments

Comments
 (0)