ci: run on both forges, and watch contrib
Adding `contrib` to the mirror without adding it here was a hole, not a gap. A pull request against a branch a workflow does not list triggers **nothing** — not a reduced set of checks, none — so an external contributor would have seen no signal at all, and neither would whoever merged their work. The branch and its CI had to land together; the previous commit shipped only half of that. So `contrib` joins `develop` and `main` in both trigger lists, and the three `github.server_url != 'https://github.com'` guards are gone. Their reason went with Verdaccio: the packages used to build against a core that existed only on an internal registry a public runner cannot reach, and they resolve `@green-tea/core` from npmjs.org now. Guarding CI to one forge while inviting contributions to the other cannot both be true. The dco job keeps `github.event_name == 'pull_request'`, matching core, so it reports on pull requests and costs nothing on push. Verified the way a public runner would: the workflow names no secrets and no internal hosts, and a fresh clone runs `npm ci`, lint, typecheck, the Node suite and `deno publish --dry-run` with nothing configured. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
2 files changed
+27
-14
No files matched your search
@@ -1,20 +1,27 @@
|
||||
name: CI
|
||||
|
||||
# Runs on the development forge only, through the `if:` guards below. The reason they were added is
|
||||
# gone — the packages used to build against a core that existed on an internal registry, and now
|
||||
# resolve it from npmjs.org like anyone else — so lifting them is unblocked. Until that happens, the
|
||||
# public mirror carries this file with every job skipped.
|
||||
# Runs on BOTH forges. It used to be guarded to the development forge, because the packages built
|
||||
# against a core that existed only on an internal registry a public runner cannot reach. They now
|
||||
# resolve `@green-tea/core` from npmjs.org, so that reason is gone and the guards are too.
|
||||
#
|
||||
# `contrib` is in both lists because external pull requests target it (CONTRIBUTING.md). Leaving it
|
||||
# out is not a smaller version of running CI — it is none: a pull request against a branch that is
|
||||
# not listed triggers nothing at all, so a contributor gets no signal and neither does whoever
|
||||
# merges it.
|
||||
#
|
||||
# GitHub does not run workflows on pull requests from forks until a maintainer approves them, so a
|
||||
# contributor's first push may sit with no checks for a while. That is not a rejection.
|
||||
on:
|
||||
push:
|
||||
branches: [develop, main]
|
||||
branches: [develop, main, contrib]
|
||||
pull_request:
|
||||
branches: [develop, main]
|
||||
branches: [develop, main, contrib]
|
||||
|
||||
jobs:
|
||||
# Its own job so a missing sign-off reports on its own and costs nothing on push. Checks that the
|
||||
# trailer is present, not that it matches the author.
|
||||
dco:
|
||||
if: github.event_name == 'pull_request' && github.server_url != 'https://github.com'
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -39,7 +46,6 @@ jobs:
|
||||
|
||||
# Node 22 is the lowest `engines.node` any package declares (spec 2.5: build on the floor).
|
||||
build:
|
||||
if: github.server_url != 'https://github.com'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -59,7 +65,6 @@ jobs:
|
||||
# A fixed matrix, not `fromJSON`: Gitea Actions support for a dynamic matrix was not verified. Each
|
||||
# entry runs only the packages whose engines name that runtime (scripts/run-runtime.mjs).
|
||||
runtimes:
|
||||
if: github.server_url != 'https://github.com'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
Reference in new issue
Block a user