Skip to content

Commit

Permalink
fix: Update DockerHub API
Browse files Browse the repository at this point in the history
We're apparently using unsupported API, and
it has changed.

See also:
 - docker/hub-feedback#2127
 - docker/hub-tool#172
 - docker/build-push-action#21
  • Loading branch information
reitzig committed Jul 2, 2023
1 parent 8b77723 commit 772ddce
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/scripts/update-dockerhub-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,16 @@ dh_token=$(print_curl_response_json | jq -r .token)
echo "Will try to update the description of ${dh_repo}"
curl -siX PATCH "https://hub.docker.com/v2/repositories/${dh_repo}/" \
-H "Authorization: JWT ${dh_token}" \
-H "Content-Type: application/json" \
-o "${CURL_OUT}" \
--data-urlencode description="${gh_description}" \
--data-urlencode full_description@"${readme_profile_filepath}"
--data @- << PAYLOAD
{
"description": "${gh_description}",
"full_description": $(jq -Rsa . "${readme_profile_filepath}")
}
PAYLOAD
# NB: jq outputs a JSON string, that is `"..."`.
# Therefore, we don't add additional quotes, which break the outer JSON!

# TODO: tags/categories/topics? << Github topics
# TODO: icon?
Expand Down

0 comments on commit 772ddce

Please sign in to comment.