Skip to content

Commit

Permalink
Cancel in progress actions for PRs on subsequent pushes
Browse files Browse the repository at this point in the history
  • Loading branch information
julienp committed Nov 13, 2024
1 parent 4d5ec96 commit 3b43841
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ on:
branches:
- "main"

concurrency:
# Use github.run_id on main branch
# Use github.event.pull_request.number on pull requests, so it's unique per pull request
# Use github.ref on other branches, so it's unique per branch
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} # Used by test-containers.sh\
Expand Down

0 comments on commit 3b43841

Please sign in to comment.