Added rule to push readme to Docker Hub

This commit is contained in:
Toni Corvera 2020-03-17 13:28:01 +01:00
parent 99508f9b5a
commit 762626a69b
1 changed files with 11 additions and 0 deletions

View File

@ -59,3 +59,14 @@ multiarch-bootstrap:
multiarch-unbootstrap:
$(DOCKER_BUILDX) rm $(MULTIARCH_BUILDER_NAME)
# Since currently multi-arch images can't use Docker Hub's autobuilders,
# the README won't get updated automatically, this rule updates it.
push-readme:
docker run --rm \
-v $(PWD)/README.md:/data/README.md \
-e DOCKERHUB_USERNAME=$(shell echo $(IMAGE_NAME) | cut -d/ -f1) \
-e DOCKERHUB_REPO_PREFIX=$(shell echo $(IMAGE_NAME) | cut -d/ -f1) \
-e DOCKERHUB_REPO_NAME=$(shell echo $(IMAGE_NAME) | cut -d/ -f2) \
-e DOCKERHUB_PASSWORD=$(shell relevation hub.docker.com 2>/dev/null | sed -E -e '/^Password/!d' -e 's/^(\w|:)*\s//') \
sheogorath/readme-to-dockerhub