Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add task to makefile to retrieve manifest digests
Browse files Browse the repository at this point in the history
Co-authored-by: Brend Smits <[email protected]>
Signed-off-by: Marco Franssen <[email protected]>
marcofranssen and Brend-Smits committed Feb 18, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 7fa1afa commit 42033d4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -139,6 +139,11 @@ container-digest: ## retrieves the container digest from the given tag
@:$(call check_defined, GITHUB_REF)
@docker inspect $(GHCR_REPO):$(subst refs/tags/,,$(GITHUB_REF)) --format '{{ index .RepoDigests 0 }}' | cut -d '@' -f 2

.PHONY: manifest-digest
manifest-digest: ## retrieves the container digest from the given tag
@:$(call check_defined, GITHUB_REF)
@docker manifest inspect $(GHCR_REPO):$(subst refs/tags/,,$(GITHUB_REF)) | grep digest | cut -d '"' -f 4

.PHONY: container-tags
container-tags: ## retrieves the container tags applied to the image with a given digest
@:$(call check_defined, CONTAINER_DIGEST)

0 comments on commit 42033d4

Please sign in to comment.