惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

G
Google Developers Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Martin Fowler
Martin Fowler
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
P
Proofpoint News Feed
博客园_首页
J
Java Code Geeks
C
Check Point Blog
I
InfoQ
Apple Machine Learning Research
Apple Machine Learning Research
大猫的无限游戏
大猫的无限游戏
D
Docker
U
Unit 42
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
GbyAI
GbyAI
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Auto-cancel Redundant GitHub Actions — Save 40% Runner Time
Sohana Akbar · 2026-05-15 · via DEV Community

Sohana Akbar

If you’re paying for GitHub Actions minutes, you’re probably wasting money. Every time you push new commits while a previous workflow is still running, those old runs become pointless. But they keep burning through your runner time anyway.

The fix is simple: auto-cancel redundant workflows.

The Problem
Picture this: You push a commit. Tests start running. Before they finish, you push a second commit with a tiny typo fix. Now two workflows are running simultaneously — one on an outdated commit you no longer care about.

That first run is garbage. But GitHub still charges you for every minute of it.

Multiply this across your team. Across multiple PRs. Across the entire day. You're easily looking at 30–50% wasted runner time.

The Solution
One YAML block inside your GitHub Actions workflow:

yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
That’s it.

group — creates a named queue per workflow + branch. Only one run from this group runs at a time.

cancel-in-progress — kills the older run immediately when a new one arrives.

Real-World Results
At a previous company, we added this to all PR-triggered workflows. Our monthly runner minutes dropped from ~45,000 to ~27,000.

40% saved. Zero effort after setup.

Where to Use This
✅ Pull request checks (test, lint, build)

✅ Push-triggered workflows on the same branch

✅ Deployment jobs where only the latest matters

Where NOT to Use It
❌ Release workflows (you want each to complete)

❌ Scheduled workflows with overlapping logic

❌ Matrix builds you actually need in parallel

Pro Tip
Combine with branch‑level rules:

yaml
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
This cancels on feature branches but protects your main branch builds.
A three-line change. Five minutes of work. Potentially thousands of saved runner minutes per month.

If you're paying for GitHub Actions, this is the lowest‑hanging fruit in your CI bill.

Go add concurrency to your workflows today.