Skip to content

fix(ci): let the caller choose the runner, default to GitHub-hosted - #42

Merged
AnuragVasanwala merged 1 commit into
mainfrom
fix/runs-on-input
Oct 1, 2026
Merged

AnuragVasanwala merged 1 commit into
mainfrom
fix/runs-on-input

Conversation

@aryanjasala

Copy link
Copy Markdown
Member

#37 (rtBot) hard-coded runs-on: [self-hosted] in every job, per the org policy for private repositories. A reusable workflow's jobs run in the calling repository, so:

  • this repository is public now, and its own CI (ci-self-check.yml) waits for a self-hosted runner that never picks it up (see chore: merge release/v1.0.0 into main (merge commit only) #41);
  • public callers (theme-elementary, plugin-elementary, anyone outside rtCamp) cannot use rtCamp's self-hosted runners at all;
  • rtCamp's private repositories still have to use self-hosted runners.

Hard-coding either label is wrong for one of them, so the caller chooses.

Changes

  • Every reusable workflow gains a runs-on input (JSON: a label or a list of labels), default "ubuntu-latest", and every job uses runs-on: ${{ fromJSON(inputs.runs-on) }}.

  • wp-ci.yml and wp-cd.yml forward it to all 13 workflows they call (runs-on: ${{ inputs.runs-on }}).

  • ci-self-check.yml (this repo's own CI) runs on ubuntu-latest.

  • bin/check-workflows.sh now requires reusable workflows to declare the input, use it on every job, and forward it to every leaf. This repo's own CI is checked against an allow-list (ubuntu-latest).

  • README, AGENTS.md and CHANGELOG describe the input. rtCamp private repos pass:

        with:
          runs-on: '["self-hosted"]'

The #38 additions for the self-hosted image (pinned yq, the AWS CLI install when missing) stay; they are no-ops where the tools exist.

Decision to check

The default is GitHub-hosted, because the repository is public and its examples are meant to run as-is. The alternative is defaulting to '["self-hosted"]', so private rtCamp repos comply without passing anything, at the cost of every public caller having to override it. Today private callers such as icimod already run these workflows on GitHub-hosted runners through @release/v1.0.0.

Testing

  • bin/check-workflows.sh, actionlint and yamllint -c .yamllint.yml . pass
  • bin/check-workflows.sh fails, as intended, when a reusable workflow hard-codes a label, when an orchestrator leaf does not forward runs-on, and when ci-self-check.yml goes back to [self-hosted]
  • This PR's own checks run on ubuntu-latest

#37 hard-coded runs-on: [self-hosted] in every job. A reusable workflow's
jobs run in the calling repository, so public callers (theme-elementary,
plugin-elementary, outside users) and this now-public repository's own CI
wait for a runner that never comes, while rtCamp's private repositories
are required by org policy to use self-hosted runners.

Every reusable workflow now takes a runs-on input (JSON, default
"ubuntu-latest"), and wp-ci.yml and wp-cd.yml forward it to every workflow
they call. ci-self-check.yml runs on ubuntu-latest. bin/check-workflows.sh
requires reusable workflows to use and forward the input instead of checking
a label allow-list, and keeps the allow-list (ubuntu-latest) for this
repo's own CI.
@AnuragVasanwala
AnuragVasanwala merged commit c54f390 into main Oct 1, 2026
@AnuragVasanwala
AnuragVasanwala deleted the fix/runs-on-input branch October 1, 2026 21:24
aryanjasala added a commit that referenced this pull request Oct 1, 2026
Picks up #42. Both added an Unreleased section to CHANGELOG.md; it now
holds #42's Changed entry and #40's Fixed entries.
@aryanjasala aryanjasala mentioned this pull request Oct 1, 2026
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