Stop Using Labels to Control CI in GitHub Actions
Blog post from Mergify
In the blog post, Julien Danjou critiques the practice of using GitHub labels to control continuous integration (CI) workflows, arguing that this approach is flawed due to GitHub's event handling, which triggers a full workflow run whenever any label is changed, leading to unnecessary compute costs and potential errors in code merging. The post explains that GitHub Actions cannot filter events based on specific labels, causing any label change to rerun the entire pipeline, including unrelated tests, and risking skipped tests being mistakenly marked as passed due to branch protection rules. Danjou suggests that the reliance on labels for CI control is misguided and proposes alternatives, such as using workflow_dispatch for manual test runs or employing a merge queue system like Mergify, which runs expensive tests only when a pull request is about to merge, ensuring that only necessary tests are performed at the right time. This approach not only reduces compute costs but also ensures that required tests are genuinely executed before code merges, avoiding the pitfalls of skipped or falsely passed checks and providing a more reliable and efficient CI/CD process.
No tracked trend matches for this post yet.