diff --git a/utils/publish/update-docker-hub-full-description.sh b/utils/publish/update-docker-hub-full-description.sh new file mode 100644 index 0000000..32bd90c --- /dev/null +++ b/utils/publish/update-docker-hub-full-description.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Based upon https://gist.github.com/jlhawn/8f218e7c0b14c941c41f +# and https://github.com/moikot/golang-dep/blob/master/.travis/push.sh + +# Get a token from hub.docker.com with the owner credentials. +token=$(curl -s \ + -X POST \ + -H "Content-Type: application/json" \ + -d '{"username": "'"$CI_REGISTRY_OWNER_USERNAME"'", "password": "'"$CI_REGISTRY_OWNER_PASSWORD"'"}' \ + https://hub.docker.com/v2/users/login/ | jq -r .token) + +# Generate a JSON with the README.md as the full_description. +json=$(jq -n \ + --arg readme "$(