Skip to content

build/bake: allow runner mappings for platform-specific builds#188

Open
crazy-max wants to merge 5 commits intodocker:mainfrom
crazy-max:runner-select
Open

build/bake: allow runner mappings for platform-specific builds#188
crazy-max wants to merge 5 commits intodocker:mainfrom
crazy-max:runner-select

Conversation

@crazy-max
Copy link
Copy Markdown
Member

@crazy-max crazy-max commented Apr 29, 2026

fixes #161

This change lets the runner input accept either a single GitHub-hosted Linux runner label or newline-delimited mappings that select runner labels by platform prefix.

The build and bake workflows now parse runner mappings, resolve the most specific matching platform prefix for distributed builds, keep ubuntu-24.04 as the default runner, and route Linux ARM platforms to ubuntu-24.04-arm.

The previous auto, amd64, and arm64 values are still supported for compatibility, but they now emit deprecation warnings. Existing callers keep working, while new configurations can use explicit runner labels or platform mappings instead.

This keeps the current GitHub-hosted Linux runner contract and makes runner selection more explicit and extensible without introducing a generic runs-on escape hatch.

@crazy-max crazy-max requested a review from tonistiigi May 4, 2026 08:20
@crazy-max crazy-max marked this pull request as ready for review May 4, 2026 08:20
@crazy-max crazy-max requested a review from a team as a code owner May 4, 2026 08:20
Comment thread .github/workflows/bake.yml Outdated
with:
script: |
const runnerEnvironment = core.getInput('runner-environment');
if (runnerEnvironment !== 'github-hosted') {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also check "linux"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good catch. Updated this to require both runner.environment == 'github-hosted' and runner.os == 'Linux'.

crazy-max added 5 commits May 6, 2026 10:17
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
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.

Distributed runner mapping is too strict

2 participants