Skip to content

Commit

Permalink
Use concurency for canceling workflows (#318)
Browse files Browse the repository at this point in the history
Stop using `styfle/cancel-workflow-action` and use the builtin
concurrency feature.

---------

Co-authored-by: Nathan Clack <nclack@chanzuckerberg.com>
  • Loading branch information
Czaki and nclack authored Oct 13, 2023
1 parent fad71d8 commit 8c58b91
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
pull_request: {}
workflow_dispatch:

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true

jobs:
check-manifest:
name: Check Manifest
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test_all_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on:
types: [ labeled ]
workflow_dispatch:

concurrency:
group: test-plugins-${{ github.ref }}
cancel-in-progress: true

jobs:
get-plugins:
if: github.event.label.name == 'test-all-plugins' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- id: plugin_names
run: echo "::set-output name=plugins::$(curl -s https://api.napari-hub.org/plugins | jq -c 'keys')"
outputs:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test_conversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
# pull_request:
workflow_dispatch:

concurrency:
group: convert-${{ github.ref }}
cancel-in-progress: true

jobs:
get-plugins:
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- id: plugin_names
run: echo "::set-output name=plugins::$(curl -s https://api.napari-hub.org/plugins | jq -c 'keys')"
outputs:
Expand Down

0 comments on commit 8c58b91

Please sign in to comment.