Orchestrating Renovate, Dependabot, release PRs and tests on main: a priority queue for GitHub Actions
A modern repository has four or more parties writing to main, and none of them talks to the others. Developers open pull requests. Renovate or Dependabot open more. A release tool opens one on top. And a workflow runs on main after every merge. Each of them triggers CI, each of them is affected by every merge, and GitHub Actions runs them in whatever order they happen to arrive. If CI is cheap…
In modern repositories with multiple contributors working on the main branch, there are several actors involved in the process. Developers open pull requests, while Renovate and Dependabot automatically open more PRs. A release tool also opens a PR to update the version and changelog. The pipeline on main runs after every merge, potentially interfering with other PRs. The challenge arises because the actor that should go last, the release PR, is the quickest to update, while the slower-acting PRs are tested first.
To solve this coordination problem, the author created a GitHub Action called boarding-gate. This action enforces a priority queue for workflow runs, ensuring that developers' PRs are tested first, followed by dependency bots, then the release PR, and finally main. The weight of each run is determined by label priorities, with higher-weighted runs being tested first.
The boarding-gate action also ensures that branches are rebased or failed if they are behind main, preventing unnecessary testing of stale branches. By implementing this rule, the process becomes more efficient, reducing the number of runs and preventing collisions between deployments.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.