feat(docker): sync the Docker Hub overview from the README, drop description/category - #3
Merged
Merged
Conversation
…ription/category Removed the description and category update entirely - not something to change every time the code does. Replaced with syncing the README into Docker Hub's full_description field (the "Overview" shown on the repository's public page, currently empty), the same way GHCR already shows a linked repository's README automatically. README.md is bigger than Docker Hub's 25,000-byte full_description limit, so when it doesn't fit, the content is cut to the last full line under the limit with a note and a link to the complete README ahead of the content - not only after it's already cut off partway through some unrelated section - and any code fence left open by the cut is closed so the rest doesn't render as unstyled text trapped inside it. Keeps the continue-on-error handling from the previous description/category attempt: the same endpoint, same insufficient-scope issue applies here too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
full_descriptionfield, currently empty on the public repository page) from this repository'sREADME.md, on every publish — the same way GHCR already shows a linked repository's README automatically.Handling the size limit
README.mdis ~64KB; Docker Hub capsfull_descriptionat 25,000 bytes. When it doesn't fit:Verified locally against the real README: final size ~24,978 bytes, clean paragraph break after the notice, code fence correctly closed.
Re-confirmed the Docker Hub API issue from the last PR
Same endpoint as before (
/v2/repositories/{repo}full_description), so I expected — and got — the same403 access denied: insufficient scopeon a live test run. This time, checking the live repository afterward, the write genuinely did not apply (full_descriptionstill empty) — unlike the earlier, apparently-flukey case withdescription/categorieswhere it went through despite the same error. That confirms this really is blocked onDOCKERHUB_TOKEN's scope, not something to rely on working around.Kept
continue-on-error: true(a cosmetic overview sync must never fail the actual image publish) with the same clear error message pointing at the fix: reissueDOCKERHUB_TOKENon Docker Hub with "Read, Write, Delete" scope. Once that's done, this starts working automatically on the next publish.Merging this
Contains a
featcommit, so merging will trigger a new release per the repo's automation.