Skip to content

Commit 319fbb1

Browse files
gambe94claude
andcommitted
Fix: make Docker Hub README sync non-fatal and run it after the version report
In the v1.7.0 sf-docker-images release the description PATCH returned 403 Forbidden (push-scoped tokens cannot update repo descriptions — Docker Hub requires Read/Write/Delete scope or the account password). The failing step sat before the version-report steps, so all three push jobs failed after a successful push+sign and the caller's release job was skipped. The sync step now runs last with continue-on-error: true — cosmetic sync issues can no longer block the release path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 56820de commit 319fbb1

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

.github/workflows/docker-build-test-push.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -228,18 +228,6 @@ jobs:
228228
DIGEST: ${{ steps.push.outputs.digest }}
229229
run: cosign sign --yes "${{ inputs.dockerhub-username }}/${{ inputs.image-name }}@${DIGEST}"
230230

231-
# Requires a read/write Docker Hub token (read-only tokens cannot update
232-
# repository descriptions).
233-
- name: Sync README to Docker Hub
234-
if: ${{ inputs.image-description != '' }}
235-
uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2
236-
with:
237-
username: ${{ inputs.dockerhub-username }}
238-
password: ${{ secrets.dockerhub-token }}
239-
repository: ${{ inputs.dockerhub-username }}/${{ inputs.image-name }}
240-
short-description: ${{ inputs.image-description }}
241-
readme-filepath: ${{ inputs.context }}/README.md
242-
243231
# Tool versions are read from the built image (source of truth, not the
244232
# Dockerfile) and aggregated by the caller's release job.
245233
- name: Build version report
@@ -270,3 +258,19 @@ jobs:
270258
name: version-report-${{ inputs.image-name }}
271259
path: version-report-${{ inputs.image-name }}.md
272260
retention-days: ${{ inputs.artifact-retention-days }}
261+
262+
# Cosmetic; must never fail the release path (v1.7.0 lesson: a Forbidden
263+
# here skipped the version report and the caller's release job).
264+
# Docker Hub's description PATCH needs a token with Read/Write/Delete
265+
# scope (or the account password) — a push-scoped read/write token gets
266+
# 403 Forbidden even though docker push works.
267+
- name: Sync README to Docker Hub
268+
if: ${{ inputs.image-description != '' }}
269+
continue-on-error: true
270+
uses: peter-evans/dockerhub-description@432a30c9e07499fd01da9f8a49f0faf9e0ca5b77 # v4.0.2
271+
with:
272+
username: ${{ inputs.dockerhub-username }}
273+
password: ${{ secrets.dockerhub-token }}
274+
repository: ${{ inputs.dockerhub-username }}/${{ inputs.image-name }}
275+
short-description: ${{ inputs.image-description }}
276+
readme-filepath: ${{ inputs.context }}/README.md

0 commit comments

Comments
 (0)