Skip to content

Fix the release workflow's cache scope and branch selection - #37

Merged
Pijukatel merged 6 commits into
masterfrom
claude/actor-runtime-docker-ci-gwjffi
Sep 7, 2026
Merged

Fix the release workflow's cache scope and branch selection#37
Pijukatel merged 6 commits into
masterfrom
claude/actor-runtime-docker-ci-gwjffi

Conversation

@Pijukatel

@Pijukatel Pijukatel commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Two fixes to the release workflow #36 added. No new functionality — Dockerfile and the multi-arch build itself are untouched.

The multi-platform cache scope was invalid

cache-from: type=gha,scope=release-${{ inputs.platforms }}

expanded to type=gha,scope=release-linux/amd64,linux/arm64. A type=gha value is itself a comma-separated key=value list, so the comma inside the platform list terminated scope and buildx read the leftover linux/arm64 as a bare key:

ERROR: invalid value linux/arm64

That killed the run before any build step, so any dispatch with the default multi-platform list failed. Only a single-platform run (no comma) got through.

Both cache flags now use one shared release scope. The per-platform-set keying it replaces wasn't worth having: GHA cache scopes are separate namespaces, so sharing one lets a single-platform run reuse layers a multi-arch run already cached instead of starting cold.

The branch input silently overrode the branch you picked

There were two branch selectors, and the one you didn't touch won. Use workflow from chose which release.yml ran; the branch input chose what got checked out and tagged — and it defaulted to master. Dispatching from a feature branch and leaving the input alone therefore ran that branch's workflow against master's tree and pushed master-<sha>, master, latest.

The input is gone. actions/checkout now takes no ref: at all, so it uses the dispatch commit, and the tag slug comes from github.ref_name. One branch picker, and no way for the built ref to disagree with it.

Remaining inputs: image, extra_tag, latest, platforms.

README

Updated to match: Use workflow from is the only branch to choose, and the /-to-- tag slugification is now stated.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TzoV12kHAHm6EFNmUfZedq

Manual-only `Release Docker image` workflow: pick a branch (or tag/SHA) and
it builds the runtime image and pushes it to Docker Hub as one multi-arch
manifest per tag (linux/amd64 + linux/arm64 by default), so a single tag
serves x86_64 and Apple Silicon alike.

Each run publishes `<branch>-<short-sha>` (immutable) and `<branch>`
(moving); an extra tag and `:latest` are opt-in inputs, as is the platform
list. Needs `DOCKERHUB_USERNAME` / `DOCKERHUB_TOKEN` secrets, checked up
front so a missing one fails in seconds rather than after the build.

The Dockerfile's `debugpy-payload` and `builder` stages are pinned to
`$BUILDPLATFORM`: both produce architecture-independent output (a tarred
pure-Python wheel, and tsc's `dist/`), so they run natively once instead of
once per target under QEMU. The final stage keeps its own
`pnpm install --prod`, so native bindings still come from the target
architecture.

README documents both the CI workflow and the local `docker buildx` push.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzoV12kHAHm6EFNmUfZedq
CI is the way images get published; the manual `docker buildx` recipe was a
second, drift-prone copy of what the workflow already does. With only one
subsection left, its heading is folded into "Publishing the image".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzoV12kHAHm6EFNmUfZedq
`type=gha,scope=release-${{ inputs.platforms }}` expanded to
`type=gha,scope=release-linux/amd64,linux/arm64`. A `type=gha` value is
itself a comma-separated key=value list, so the comma inside the platform
list terminated `scope` and buildx read the leftover `linux/arm64` as a bare
key: `ERROR: invalid value linux/arm64`, before any build step ran.

One shared `release` scope instead. The per-platform-set keying it replaces
was not worth having anyway - GHA cache scopes are separate namespaces, so
sharing one lets a single-platform run reuse layers a multi-arch run already
cached rather than starting cold.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzoV12kHAHm6EFNmUfZedq
`release.yml` landed on master via #36 with the same content this branch
already had, so the whole file conflicted add/add. Resolved by keeping this
branch's cache scope: master's `scope=release-${{ inputs.platforms }}` is
the form that fails with `ERROR: invalid value linux/arm64` on a
multi-platform run, since a `type=gha` value is itself a comma-separated
key=value list. Dockerfile and README were already byte-identical.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzoV12kHAHm6EFNmUfZedq
The `branch` input defaulted to `master`, so picking a branch in "Use
workflow from" and leaving the input alone ran that branch's workflow file
against master's tree and tagged the image `master-<sha>`. Two branch
selectors where one silently overrode the other.

The input is now optional and empty by default, falling back to
`github.ref_name` - the branch the run was dispatched from. Filling it in is
reserved for the case it was meant for: running a newer version of this
workflow against an older ref.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzoV12kHAHm6EFNmUfZedq
The workflow now always builds the branch it was dispatched from. Checkout
takes no `ref:` at all, so it uses the dispatch commit by default, and the
tag slug comes from `github.ref_name`.

One branch picker instead of two, and no way for the built ref to disagree
with the branch chosen in "Use workflow from".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TzoV12kHAHm6EFNmUfZedq
@Pijukatel Pijukatel changed the title Add manual multi-arch Docker release workflow Fix the release workflow's cache scope and branch selection Sep 4, 2026
@Pijukatel
Pijukatel merged commit 97e96f2 into master Sep 7, 2026
3 checks passed
@Pijukatel
Pijukatel deleted the claude/actor-runtime-docker-ci-gwjffi branch September 7, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants