ci: Use GitHub Actions concurrency for cancelling duplicate jobs
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
7ba6f7cdb3
commit
82646b9564
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -20,6 +20,10 @@ on:
|
||||
- 'releases/*'
|
||||
tags:
|
||||
|
||||
concurrency:
|
||||
group: build-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
Fetch-Source:
|
||||
runs-on: ubuntu-latest
|
||||
|
17
.github/workflows/cancel.yml
vendored
17
.github/workflows/cancel.yml
vendored
@ -1,17 +0,0 @@
|
||||
name: Cancelling Duplicates
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Build", "Check", "❄️ Lint"]
|
||||
types: ['requested']
|
||||
|
||||
jobs:
|
||||
cancel-duplicate-workflow-runs:
|
||||
name: "Cancel duplicate workflow runs"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: apache/airflow-cancel-workflow-runs@master
|
||||
name: "Cancel duplicate workflow runs"
|
||||
with:
|
||||
cancelMode: allDuplicates
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
sourceRunId: ${{ github.event.workflow_run.id }}
|
4
.github/workflows/check.yml
vendored
4
.github/workflows/check.yml
vendored
@ -15,6 +15,10 @@ name: Check
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: check-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-18.04
|
||||
|
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@ -2,6 +2,10 @@ name: ❄️ Lint
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
concurrency:
|
||||
group: lint-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
yamllint:
|
||||
name: 🍺 YAML
|
||||
|
Loading…
x
Reference in New Issue
Block a user