History

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

Rhys Sullivan committed 2 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
281 runs-on: blacksmith-4vcpu-ubuntu-2404281 runs-on: blacksmith-4vcpu-ubuntu-2404
282 permissions:282 permissions:
283 packages: write283 packages: write
284 env:
285 HAS_LEGACY_TOKEN: ${{ secrets.GHCR_LEGACY_TOKEN != '' }}
286
287 steps:284 steps:
288 - name: Download image digests285 - name: Download image digests
289 uses: actions/download-artifact@v4286 uses: actions/download-artifact@v4
@@ -330,10 +327,28 @@ jobs: · 40 unmodified lines
330 327
331 docker buildx imagetools create "${tag_args[@]}" "${sources[@]}"328 docker buildx imagetools create "${tag_args[@]}" "${sources[@]}"
332 329
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:
333 - name: Skip legacy GHCR mirror (GHCR_LEGACY_TOKEN not configured)344 - name: Skip legacy GHCR mirror (GHCR_LEGACY_TOKEN not configured)
334 if: env.HAS_LEGACY_TOKEN != 'true'345 if: env.HAS_LEGACY_TOKEN != 'true'
335 run: echo "GHCR_LEGACY_TOKEN is not configured; skipping legacy GHCR mirror."346 run: echo "GHCR_LEGACY_TOKEN is not configured; skipping legacy GHCR mirror."
336 347
348 - name: Set up Docker Buildx
349 if: env.HAS_LEGACY_TOKEN == 'true'
350 uses: docker/setup-buildx-action@v3
351
337 - name: Log in to legacy GHCR namespace352 - name: Log in to legacy GHCR namespace
338 if: env.HAS_LEGACY_TOKEN == 'true'353 if: env.HAS_LEGACY_TOKEN == 'true'
339 uses: docker/login-action@v3354 uses: docker/login-action@v3
@@ -342,7 +357,7 @@ jobs: · 2 unmodified lines
342 username: rhyssullivan357 username: rhyssullivan
343 password: ${{ secrets.GHCR_LEGACY_TOKEN }}358 password: ${{ secrets.GHCR_LEGACY_TOKEN }}
344 359
345 - name: Mirror self-host image to legacy GHCR namespace360 - name: Mirror release tags to the legacy namespace
346 if: env.HAS_LEGACY_TOKEN == 'true'361 if: env.HAS_LEGACY_TOKEN == 'true'
347 shell: bash362 shell: bash
348 env:363 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