Skip to content

Commit

Permalink
Merge pull request #25 from ckipp01/concurrent
Browse files Browse the repository at this point in the history
chore(ci): cancel previous running CI jobs for the same branch
  • Loading branch information
ckipp01 authored Jul 10, 2022
2 parents c769579 + de82182 commit 4416975
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ on:
- '*'
pull_request:


concurrency:
# Taken from scalameta/metals
# On main, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
group: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') ) && format('contributor-pr-base-{0}', github.sha) || format('contributor-pr-{0}', github.ref) }}
cancel-in-progress: true

env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand Down

0 comments on commit 4416975

Please sign in to comment.