GitHub Actions: Concurrency Control

My team uses GitHub Actions 18 in total jobs across about 12 workflows. When we get multiple pull requests we end up driving contention on the workflows and resources we use. I ran across concurrency control for the workflows.

To take advantage of concurrency control add this snippet to the bottom of your pull request workflow:

concurrency:
  group: audit-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true 

When you stack the commits you end up with this warning, and the prior job is stopped:

e2e-db2-with-bulkdata (11)
Canceling since a higher priority waiting request for 'integration-3014' exists

2 thoughts on “GitHub Actions: Concurrency Control”

  1. I also am experiencing the same problem. I’m wondering if it’s a timeout. More specifically, the clock for timeout-minutes starts before the job is forced to wait and the clock keeps on running even though the job is effectively paused, ultimately timing out and being canceled.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.