Skip to content

Commit 9031902

Browse files
committed
Use cancel-in-progress instead of styfle/cancel-workflow-action.
Compare google/google-java-format#1442.
1 parent 03473d8 commit 9031902

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ on:
1111
permissions:
1212
contents: read # to fetch code (actions/checkout)
1313

14+
# Cancel in-progress runs for pull requests, but not for master branch pushes
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
1419
jobs:
1520
test:
16-
permissions:
17-
actions: write # to cancel/stop running workflows (styfle/cancel-workflow-action)
18-
contents: read # to fetch code (actions/checkout)
19-
2021
name: "JDK ${{ matrix.java }} on ${{ matrix.os }}"
2122
strategy:
2223
fail-fast: false
@@ -46,10 +47,6 @@ jobs:
4647
runs-on: ${{ matrix.os }}
4748
continue-on-error: ${{ matrix.experimental }}
4849
steps:
49-
- name: Cancel previous
50-
uses: styfle/cancel-workflow-action@d07a454dad7609a92316b57b23c9ccfd4f59af66 # 0.13.1
51-
with:
52-
access_token: ${{ github.token }}
5350
- name: 'Check out repository'
5451
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
5552
with:

0 commit comments

Comments
 (0)