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 Feb 18, 2022
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
Expand Up @@ -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)
Expand Down

0 comments on commit 42033d4

Please sign in to comment.