From 9723d72aa439c8adc99dc428756dad182c7414ac Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 27 May 2026 15:53:02 +0000 Subject: [PATCH] docker-publish: pin UNSLOTH_ZOO_REF on tag pushes Previously, UNSLOTH_REF was pinned to the triggering tag (e.g. v2026.5.8) but UNSLOTH_ZOO_REF was hardcoded to main. That made release-tag images ship a zoo from whatever was on main at build time rather than the zoo release cut alongside that unsloth tag, so a 2026.5.8 tag image could install a zoo from days later. Mirror the tag branch of UNSLOTH_REF. SHA-based branch pushes still fall through to main because the unsloth SHA does not exist in the unsloth-zoo repo. workflow_dispatch still honours the unsloth_zoo_ref input. --- .github/workflows/docker-publish.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 99f4c9bea9..96ead2c8ea 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -134,7 +134,12 @@ jobs: # scheduled runs: bake the triggering commit SHA. Falls back # to `main` for any other event class. UNSLOTH_REF=${{ github.event.inputs.unsloth_ref || (startsWith(github.ref, 'refs/tags/') && github.ref_name) || github.sha || 'main' }} - UNSLOTH_ZOO_REF=${{ github.event.inputs.unsloth_zoo_ref || 'main' }} + # UNSLOTH_ZOO_REF mirrors the tag case (unsloth-zoo cuts the same + # release tag, e.g. 2026.5.8, alongside unsloth) so release-tag + # images install a matched zoo. SHA-based branch pushes can't be + # mirrored -- the SHA doesn't exist in the zoo repo -- so they + # fall through to `main`. Workflow-dispatch can override. + UNSLOTH_ZOO_REF=${{ github.event.inputs.unsloth_zoo_ref || (startsWith(github.ref, 'refs/tags/') && github.ref_name) || 'main' }} # Stash the per-arch digest as an artifact for the merge job to pick up. # Filenames need to be unique across the matrix; `platform` contains a