Use native concurrency option to cancel outdated workflow runs (#14943)

This commit is contained in:
Pascal Jufer
2022-08-08 16:16:43 +02:00
committed by GitHub
parent fadaea28ab
commit 29619f723b
3 changed files with 12 additions and 10 deletions

View File

@@ -11,6 +11,10 @@ on:
- pnpm-lock.yaml
- .github/workflows/blackbox-main.yml
concurrency:
group: blackbox-main
cancel-in-progress: true
env:
NODE_OPTIONS: --max_old_space_size=6144

View File

@@ -10,6 +10,10 @@ on:
- package.json
- pnpm-lock.yaml
concurrency:
group: blackbox-pr-${{ github.ref }}
cancel-in-progress: true
env:
NODE_OPTIONS: --max_old_space_size=6144

View File

@@ -8,20 +8,14 @@ on:
branches:
- main
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
env:
NODE_OPTIONS: --max_old_space_size=6144
jobs:
cancel:
name: Cancel Previous Runs
runs-on: ubuntu-latest
steps:
- name: Cancel
uses: styfle/cancel-workflow-action@0.10.0
with:
workflow_id: all
access_token: ${{ github.token }}
lint:
name: Lint
runs-on: ubuntu-latest