feat(workflow): replace dispatch-based ci-ready with centralized CI status poller#7674
Draft
feat(workflow): replace dispatch-based ci-ready with centralized CI status poller#7674
Conversation
e670e77 to
80c8abd
Compare
ci-pending.yml: triggered on issues:opened, adds ci-pending label and sets CI_POLLER_HAS_PENDING repo variable to "true". ci-poller.yml: cron (*/5 min) with job-level if that checks vars.CI_POLLER_HAS_PENDING — when "false", no runner is provisioned (zero cost). When "true", checks CI status for all ci-pending issues and flips to ci-ready when green. Resets variable to "false" when all pending issues are resolved. Requires creating a CI_POLLER_HAS_PENDING repo variable (initial value: "false") before deploying.
80c8abd to
b9db9cd
Compare
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.
Summary
Replace per-release idle polling inside Docker containers with a self-contained, self-dispatching CI status checker. Zero changes needed in craft or target repos.
How it works
The workflow handles the entire lifecycle:
Zero runner cost when there are no pending releases. Each check run is ~30 seconds. Self-dispatching via `repository_dispatch` is one of the few events GitHub explicitly allows `GITHUB_TOKEN` to trigger.
Why
`craft publish` currently polls GitHub's commit status API every 30 seconds for up to 60 minutes inside a Docker container. This idle polling is billed as GitHub Actions minutes and steals from our available capacity — a publish job that waits 45 minutes for CI burns 45 minutes of runner time doing nothing but `sleep 30` in a loop. For repos like sentry-native (~1h 23m CI), it also exhausts the 1-hour GitHub App token lifetime, causing expired-token failures (getsentry/craft#788).
With the poller, the publish job doesn't start at all until CI passes — the expensive Docker job gets a fresh token and runs only for the actual publishing.
Backward Compatibility