-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update-description needs to update the call to DockerHub API #138
Comments
zigarn
added a commit
to Zenika-Training/ztraining2strigo
that referenced
this issue
Jul 13, 2022
- See CircleCI-Public/docker-orb#138 - Need a PAT with full rights
Something like this could fix: diff --git c/src/scripts/update-description.sh i/src/scripts/update-description.sh
index a1006c9..80cbb22 100644
--- c/src/scripts/update-description.sh
+++ i/src/scripts/update-description.sh
@@ -13,7 +13,7 @@ PAYLOAD="username=$USERNAME&password=$PASSWORD"
JWT=$(curl -s -d "$PAYLOAD" https://hub.docker.com/v2/users/login/ | jq -r .token)
HEADER="Authorization: JWT $JWT"
URL="https://hub.docker.com/v2/repositories/$PARAM_IMAGE/"
-STATUS=$(curl -s -o /dev/null -w '%{http_code}' -X PATCH -H "$HEADER" --data-urlencode full_description@$DESCRIPTION $URL)
+STATUS=$(curl -s -o /dev/null -w '%{http_code}' -X PATCH -H "$HEADER" -H 'Content-type: application/json' --data "{\"full_description\": $(jq -Rs '.' $DESCRIPTION)}" $URL)
if [ $STATUS -ne 200 ]; then
echo "Could not update image description" But it depends on |
This was referenced Aug 19, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Orb version
2.1.2
What happened
update-description
doesn't work anymore.According to documentation and docker/hub-feedback#2127 (comment) the endpoint is only working with JSON payload and not
x-www-form-urlencoded
anymore.Expected behavior
Update command to use JSON payload.
The text was updated successfully, but these errors were encountered: