Skip to content

Commit

Permalink
ci: allow cancellation of concurrent workflows (#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia authored Feb 8, 2023
1 parent e858257 commit 5b26135
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/cdelivery-s3-caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:

jobs:
graasp-deploy-s3-workflow:
# abort previous deployment if a newer one is in progress
concurrency:
group: deploy-staging
cancel-in-progress: true

name: Graasp Builder
uses: graasp/graasp-deploy/.github/workflows/cdelivery-s3.yml@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cdeployment-s3-caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ on:
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
jobs:
graasp-deploy-s3-workflow:
# abort previous deployment if a newer one is in progress
concurrency:
group: deploy-production
cancel-in-progress: true

# Replace with repository name
name: Graasp Builder
# Replace 'main' with the hash of a commit, so it points to an specific version of the reusable workflow that is used
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cintegration-s3-caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
jobs:
graasp-deploy-s3-workflow:
# abort previous deployment if a newer one is in progress
concurrency:
group: deploy-development
cancel-in-progress: true

name: Graasp Builder
# Reference reusable workflow file. Using the commit SHA is the safest for stability and security
uses: graasp/graasp-deploy/.github/workflows/cintegration-s3.yml@v1
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
# This workflow is made up of one job that calls the reusable workflow in graasp-deploy
jobs:
graasp-deploy-cypress-workflow:
# only cancel in-progress jobs or runs for the current workflow
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

# Replace with repository name
name: Cypress caller template
# Replace 'main' with the hash of a commit, so it points to an specific version of the reusable workflow that is used
Expand Down

0 comments on commit 5b26135

Please sign in to comment.