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:

  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 responses to “GitHub Actions: Concurrency Control”

  1. Alan Cabrera Avatar
    Alan Cabrera

    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.

    1. admin Avatar

      Thanks for the comment, that makes sense – pause would explain it.

Leave a Reply

Your email address will not be published. Required fields are marked *

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