Skip to content

ci: allow overriding runner labels via organization variables - #67236

Merged
susnux merged 1 commit into
masterfrom
ci/runs-on-org-variables
Dec 1, 2026
Merged

susnux merged 1 commit into
masterfrom
ci/runs-on-org-variables

Conversation

@susnux

@susnux susnux commented Nov 30, 2026

Copy link
Copy Markdown
Contributor
  • Resolves: #

Summary

Our mirror in the nextcloud-gmbh organization has to run on self-hosted runners (["self-hosted", "ubuntu-latest"] / ["self-hosted", "ubuntu-latest-low"]). So far its sync job rewrites every runs-on line and commits that on top of each branch. That loses the low runners, and the rewrite already leaked back into this repository once (fixed by #67222).

The workflows now read the runner labels from organization (or repository) variables and fall back to the GitHub hosted runners when they are unset:

runs-on: ${{ fromJSON(vars.RUNS_ON_UBUNTU_LATEST_LOW || '"ubuntu-latest-low"') }}
Variable Default when unset
RUNS_ON_UBUNTU_LATEST ubuntu-latest
RUNS_ON_UBUNTU_LATEST_LOW ubuntu-latest-low
RUNS_ON_UBUNTU_LATEST_ASSETS ubuntu-latest-assets

None of these are set in the nextcloud organization, so nothing changes here. The templated workflows get the same change in nextcloud/.github#847, so the next template sync keeps it.

TODO

  • Set the RUNS_ON_* variables in the nextcloud-gmbh organization and stop rewriting the plain labels in its sync job

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted by ClaudeCode:claude-opus-5-5

Mirrors of this repository (e.g. in the nextcloud-gmbh organization) must
run on self-hosted runners and so far rewrite every `runs-on` line on sync.
That rewrite collapses the low and assets runners onto the default one and
the rewritten workflows already leaked back into this repository once.

Read the runner labels from the RUNS_ON_UBUNTU_LATEST,
RUNS_ON_UBUNTU_LATEST_LOW and RUNS_ON_UBUNTU_LATEST_ASSETS variables (JSON
encoded label or label list) and fall back to the GitHub hosted runners when
they are unset, so nothing changes for this organization.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
susnux marked this pull request as ready for review November 30, 2026 18:06
@susnux
susnux requested a review from a team as a code owner November 30, 2026 18:06
@susnux
susnux requested review from Altahrim and leftybournes and removed request for a team November 30, 2026 18:06
@susnux
susnux merged commit 7b66124 into master Dec 1, 2026
178 of 185 checks passed
@susnux
susnux deleted the ci/runs-on-org-variables branch December 1, 2026 10:09
@come-nc

come-nc commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

/backport to stable35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants