Repository navigation
Run fork pull requests' CI on Diffinery's runners, not GitHub's - #22
Merged
altugank merged 3 commits intoOct 31, 2026
Merged
Conversation
GitHub passes no repository variables to fork pull requests, so DIFFINERY_RUNS_ON is empty there and the job lands on GitHub's ubuntu runner, where its check for Diffinery's docker wrapper fails every time. Skip the job for forks; upstream branches and main still run it, with the check unchanged. CONTRIBUTING.md says how a maintainer runs it.
alankernel67
force-pushed
the
claude/skip-docker-e2e-on-forks
branch
from
October 31, 2026 11:18
7581ba0 to
bc42669
Compare
GitHub passes no repository variables to pull requests from forks, so DIFFINERY_RUNS_ON was empty there and every job fell back to ubuntu-latest on GitHub's own runners. In codician-team/diffinery, default the label to `diffinery` instead; the variable still overrides it, and other copies of the repository keep ubuntu-latest. With that the runner Docker job runs on fork pull requests too, so it no longer needs skipping there.
…ame millisecond Both rows can get the same created_at, and then their random ids order them, so the test failed about half the time on fast runners (Unit tests (1/2) on this pull request).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Intent: pull requests from forks should run CI on Diffinery's own GitHub runners (
runs-on: diffinery), likemainand upstream branches do, instead of on GitHub'subuntu-24.04.Every job picks its runner with
${{ vars.DIFFINERY_RUNS_ON || 'ubuntu-latest' }}. GitHub passes no repository variables to workflows of pull requests from forks, so on those (for example #21) every job ran on GitHub's runners, and "End-to-end (runner Docker)", which needs Diffinery's docker wrapper, always failed.runs-onin.github/workflowsis now${{ vars.DIFFINERY_RUNS_ON || (github.repository == 'codician-team/diffinery' && 'diffinery') || 'ubuntu-latest' }}. In this repository a fork's pull request getsdiffinery. The variable still overrides it (set it toubuntu-latestto deploy while Diffinery can't start runners), and other copies of the repository keepubuntu-latest, so their CI doesn't wait for a runner that never comes.CONTRIBUTING.md, the comments inci.ymlanddeploy.yml, theDIFFINERY_RUNS_ONrow indocs/self-hosting/deploy.md, anddocs/actions/github-runners.md, which now shows other projects how to run their fork pull requests on Diffinery with the same expression.test/unit/contact.test.ts: a test that failed about half the time on fast runners, because two messages sent in the same millisecond had their order decided by random ids, now checks them by message instead of by order. It failed "Unit tests (1/2)" here.For maintainers: fork pull requests now use the linked account's Diffinery minutes. As GitHub runners → Security advises, keep Settings → Actions → General → Require approval for fork pull request workflows on for outside contributors. Each job still gets a new container and a just-in-time runner, and fork pull requests still get a read-only token and no secrets.
This changes files under
.github/workflows, so it needs a maintainer to merge.How it was tested
This pull request is itself from the
alankernel67fork, and GitHub runs pull request workflows from the pull request's version of the files: its jobs should land ondiffinery-…runners, and "End-to-end (runner Docker)" should run and pass instead of failing on its hosted-runner check.Checklist
pnpm -r typecheckandpnpm -r testpass (no code changes)apps/diffinery/docsapps/diffinery/migrations(none)On behalf of Alan Kernel (@alankernel67).