Diffinery

homeflare/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

Skip the runner Docker e2e job on pull requests from forks

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.
Alan Kernel authored 1 parent 9948c4acommit 57fb7c26be0c8aedda01331d276f854615150c21Browse files
2 files changed+9−0
modified.github/workflows/e2e.yml+3−0View file
@@ -89,9 +89,12 @@
8989 # Docker as the hosted runner image runs it, with this change's docker wrapper, daemon config
9090 # and agent (its registry relay). It needs a Diffinery hosted runner, for the real dockerd: on
9191 # Diffinery, or on GitHub with DIFFINERY_RUNS_ON=diffinery. On GitHub's own runners it fails.
92+ # Pull requests from forks get no repository variables, so they would land on GitHub's runners:
93+ # they skip the job, and a maintainer runs it by pushing the branch to this repository.
9294 # A daemon an earlier step started is stopped first, so the first uses below start it afresh.
9395 runner-docker:
9496 name: End-to-end (runner Docker)
97+ if: ${{ !github.event.pull_request.head.repo.fork }}
9598 runs-on: ${{ vars.DIFFINERY_RUNS_ON || 'ubuntu-latest' }}
9699 timeout-minutes: 20
97100 steps:
modifiedCONTRIBUTING.md+6−0View file
@@ -57,6 +57,12 @@
5757 end-to-end shards before they merge. Tests must not depend on the speed of the machine
5858 they run on.
5959
60+The "End-to-end (runner Docker)" job needs one of Diffinery's own runners, which GitHub
61+picks through the repository variable `DIFFINERY_RUNS_ON`. GitHub doesn't pass repository
62+variables to pull requests from forks, so on a fork's pull request that job is skipped,
63+not failed. If your change touches the runner's Docker support (`containers/runner`), a
64+maintainer runs the job by pushing your branch to this repository.
65+
6066 ## Conventions
6167
6268 - **TypeScript everywhere**, in strict mode, sharing code through the workspace packages in