new(ci): Cancel in-progress workflow runs on new trigger

This commit is contained in:
Jagandeep Brar
2022-01-23 16:02:17 -05:00
parent 423e0aff84
commit 6b4e291670
3 changed files with 30 additions and 1 deletions

View File

@@ -6,9 +6,19 @@ on:
- alpha
jobs:
cancel:
name: Cancel Previous Runs
runs-on: ubuntu-latest
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action
with:
access_token: ${{ github.token }}
build:
name: Alpha Release
uses: CometTools/LunaSea/.github/workflows/build_all_platforms.yml@master
needs: cancel
with:
FLAVOR: alpha
VERSION: alpha-${{ github.sha }}

View File

@@ -6,9 +6,19 @@ on:
- beta
jobs:
cancel:
name: Cancel Previous Runs
runs-on: ubuntu-latest
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action
with:
access_token: ${{ github.token }}
build:
name: Beta Release
uses: CometTools/LunaSea/.github/workflows/build_all_platforms.yml@master
needs: cancel
with:
FLAVOR: beta
VERSION: beta-${{ github.sha }}

View File

@@ -6,10 +6,19 @@ on:
- master
jobs:
cancel:
name: Cancel Previous Runs
runs-on: ubuntu-latest
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action
with:
access_token: ${{ github.token }}
build:
name: Internal Release
uses: CometTools/LunaSea/.github/workflows/build_all_platforms.yml@master
needs: cancel
with:
FLAVOR: internal
VERSION: internal-${{ github.sha }}