Skip to content

Commit

Permalink
ci: cancel CI run when another starts
Browse files Browse the repository at this point in the history
When a user pushes a change to a PR, if there was an ongoing CI run,
this will cancel any previous runs. This will save some CO2.

Signed-off-by: Ernesto Puerta <[email protected]>
  • Loading branch information
epuertat committed Jan 23, 2024
1 parent 7f89377 commit b6d3040
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on: # yamllint disable rule:truthy
release:
types:
- created
# Credit: https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
WAIT_INTERVAL_SECS: 1
jobs:
Expand Down

0 comments on commit b6d3040

Please sign in to comment.