History

Isolate the legacy GHCR mirror in its own release job (#1620)

Rhys Sullivan committed 3 months ago

Commit 6dff8911 parent 60ad50c1 file · +19 −4Browse files

Showing the changes to .github (1 of 1 file). Show all

Unified · Split

.github/workflows/publish-selfhost-docker.yml+19−4
@@ -281,9 +281,6 @@ jobs: · 280 unmodified lines
281281 runs-on: blacksmith-4vcpu-ubuntu-2404
282282 permissions:
283283 packages: write
284− env:
285− HAS_LEGACY_TOKEN: ${{ secrets.GHCR_LEGACY_TOKEN != '' }}
286−
287284 steps:
288285 - name: Download image digests
289286 uses: actions/download-artifact@v4
@@ -330,10 +327,28 @@ jobs: · 40 unmodified lines
330327
331328 docker buildx imagetools create "${tag_args[@]}" "${sources[@]}"
332329
330+ # Mirrors each release to the pre-org-move namespace
331+ # (ghcr.io/rhyssullivan/executor-selfhost), which GHCR cannot redirect.
332+ # Deliberately a separate job: the canonical publish above never depends on
333+ # it, and a failure here (an expired GHCR_LEGACY_TOKEN, historically) shows
334+ # as one red job pointing at exactly what to fix.
335+ mirror-legacy:
336+ needs:
337+ - metadata
338+ - merge
339+ runs-on: blacksmith-4vcpu-ubuntu-2404
340+ env:
341+ HAS_LEGACY_TOKEN: ${{ secrets.GHCR_LEGACY_TOKEN != '' }}
342+
343+ steps:
333344 - name: Skip legacy GHCR mirror (GHCR_LEGACY_TOKEN not configured)
334345 if: env.HAS_LEGACY_TOKEN != 'true'
335346 run: echo "GHCR_LEGACY_TOKEN is not configured; skipping legacy GHCR mirror."
336347
348+ - name: Set up Docker Buildx
349+ if: env.HAS_LEGACY_TOKEN == 'true'
350+ uses: docker/setup-buildx-action@v3
351+
337352 - name: Log in to legacy GHCR namespace
338353 if: env.HAS_LEGACY_TOKEN == 'true'
339354 uses: docker/login-action@v3
@@ -342,7 +357,7 @@ jobs: · 2 unmodified lines
342357 username: rhyssullivan
343358 password: ${{ secrets.GHCR_LEGACY_TOKEN }}
344359
345− - name: Mirror self-host image to legacy GHCR namespace
360+ - name: Mirror release tags to the legacy namespace
346361 if: env.HAS_LEGACY_TOKEN == 'true'
347362 shell: bash
348363 env:

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t