Skip to content

Commit

Permalink
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]>
  • Loading branch information
marcofranssen and Brend-Smits committed Jan 20, 2022
1 parent 27ed41f commit 755317c
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
Expand Up @@ -131,6 +131,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)
Expand Down

0 comments on commit 755317c

Please sign in to comment.