Repository navigation
ci: keep upstream workflows quiet between fork-sync runs - #18
Conversation
Add a fork-quiet workflow that disables active non-fork workflows and cancels their unfinished runs on the events upstream workflows use and hourly. fork-sync calls it as a reusable workflow. Fixes #14
@codex review |
|
@codex review |
|
@codex review |
|
@codex review |
Lead merge check on head |
|
To use Codex here, create an environment for this repo. |
Correction to my merge note: the Actions |
Part of #14.
GitHub registers a workflow, active, the first time an event matches it, and an unregistered workflow cannot be disabled in advance (
GET /actions/workflows/<file>returns 404). Only fork-sync disabled upstream workflows, once a day, so a workflow registered in between ran freely until the next sync.The new
fork-quietworkflow disables every active non-fork-*workflow and then force-cancels unfinished runs of those workflows. A plain cancel still runs thealways()steps of upstream jobs. It runs hourly and on the events upstream's workflows use: push, create, pull_request, issues, issue_comment and release. A new upstream workflow now stays active for minutes, not a day, and a run that starts on the same event is usually cancelled before it finishes. fork-sync calls it as a reusable workflow instead of keeping its own copy. Both files set top-levelpermissions: {}and grant per job (actions: writefor the quiet job,contents: readforsync).Options I rejected:
run:steps.Remaining gap: an upstream workflow that a schedule or a PR from another repository registers stays active until the next hourly pass, which then cancels its run if it is still going. Parallel fork-quiet runs are safe: a run whose disable fails passes only if the workflow is no longer active. The README's new "Upstream workflows" section documents this.
Validation: actionlint (pinned to the
mise.tomlrevision, with shellcheck) passes onfork-*.yaml. zizmor 1.11.0 reports only theartipackedfinding that already existed on fork-sync'ssynccheckout. No dashes. markdownlint gives the same 7 table-style errors asmain. The test audit found no tests to add or change. Polish and the test audit stayed inside the three changed files.Remote UAT: skipped. The change is GitHub Actions configuration only and does not touch the Coder server, so the evidence below comes from this PR's own Actions runs.
Actions evidence
main, all green:mainafter the merge: push 42532065122, issues 42532067740, issue_comment 42532077245weekly-docsrun 42526199687, which had beenin_progresssince 21:38 UTC. A plain cancel in the earlier runs did not stop it. It is nowcompleted/cancelled.85f532d445): green, run 42530484389.gh api repos/ibetitsmike/coder/actions/workflows --paginateat 2026-11-08 22:49 UTC: onlyfork-ci.yamlandfork-quiet.yaml. These 17 aredisabled_manually: backport, cherry-pick, ci, contrib, dependabot, deploy-docs, doc-check, docs-preview, eval-coder-agents, flake-go, fork-sync, linear-release, pr-auto-assign, scorecard, stale, triage-via-chat-api, weekly-docs. fork-sync was turned off on GitHub separately, because the upstream sync now runs locally.