Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

ci: run CI, pages and Docker only for main (#731)

Yaowei Zheng2b36ef3adf6a
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 57d2343d..664747c8 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,12 +12,16 @@
# again as the suite grows, whereas `ci` means what it has always meant.
name: CI
-# Limit triggers to avoid duplicate runs: push runs only on main/dev; PRs always run once (no target-branch filter --
-# this repo's PRs often target integration branches rather than main/dev, and a target filter would leave them with no CI).
+# Triggers are deliberately narrow: a push to main, and a pull request whose base is main.
+# The runner pool is shared and one run is 21 jobs, so a pull request against any other
+# branch — a stacked PR, an integration branch — gets no CI until it is retargeted at main
+# (or someone dispatches this workflow by hand). That is the trade: fewer runs over a
+# pull request's life, not a gate on every branch.
on:
push:
- branches: [main, dev]
+ branches: [main]
pull_request:
+ branches: [main]
workflow_dispatch:
concurrency:
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 8a948b42..f24a992c 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -37,7 +37,10 @@ on:
type: boolean
push:
branches: [main]
+ # Same trigger policy as ci.yml: only a pull request whose base is main, and only when it
+ # touches the image.
pull_request:
+ branches: [main]
paths:
- Dockerfile
- .dockerignore
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
index bc6362d8..6e678b50 100644
--- a/.github/workflows/pages.yml
+++ b/.github/workflows/pages.yml
@@ -17,7 +17,10 @@ on:
- "packages/docs/**"
- "scripts/build-site.mjs"
- ".github/workflows/pages.yml"
+ # Same trigger policy as ci.yml: only a pull request whose base is main gets the preview
+ # build, and only when it touches the site.
pull_request:
+ branches: [main]
paths:
- "packages/landing/**"
- "packages/docs/**"
diff --git a/changelog/unreleased/2026-09-15-ci-main-only-triggers.md b/changelog/unreleased/2026-09-15-ci-main-only-triggers.md
new file mode 100644
index 00000000..76c2cd37
--- /dev/null
+++ b/changelog/unreleased/2026-09-15-ci-main-only-triggers.md
@@ -0,0 +1,12 @@
+# CI and the pages build run only for main
+
+- **Date:** 2026-09-15
+- **Type:** process
+- **Scope:** `ci`
+
+[中文版](2026-09-15-ci-main-only-triggers.zh.md)
+
+## What changed
+
+- The CI workflow runs on a push to `main` and on a pull request whose base is `main`, and on nothing else: the `dev` push trigger is gone, and a pull request against any other branch — a stacked PR, an integration branch — no longer starts a run until it is retargeted at `main` (a manual dispatch still works). One run is 21 jobs on a shared runner pool, and that is where the queue was going.
+- The pages and Docker workflows' pull-request triggers take the same base filter, on top of their existing path filters; their push triggers were already `main` only.
diff --git a/changelog/unreleased/2026-09-15-ci-main-only-triggers.zh.md b/changelog/unreleased/2026-09-15-ci-main-only-triggers.zh.md
new file mode 100644
index 00000000..3d832ff4
--- /dev/null
+++ b/changelog/unreleased/2026-09-15-ci-main-only-triggers.zh.md
@@ -0,0 +1,12 @@
+# CI 与站点构建只为 main 触发
+
+- **Date:** 2026-09-15
+- **Type:** process
+- **Scope:** `ci`
+
+[English](2026-09-15-ci-main-only-triggers.md)
+
+## 变更内容
+
+- CI 工作流只在推送到 `main`、以及目标分支为 `main` 的 pull request 时运行,其余一概不触发:`dev` 的推送触发去掉了,目标是别的分支的 pull request(堆叠的 PR、集成分支)在改为以 `main` 为目标之前不再起跑(手动 dispatch 仍可用)。一次运行是共享 runner 池上的 21 个 job,队列就是这么堆起来的。
+- pages 与 Docker 工作流的 pull request 触发加上同样的目标分支过滤,叠在各自原有的路径过滤之上;两者的推送触发本来就只有 `main`。