Skip to content

Commit ef5225b

Browse files
authored
Add concurrency. (#640)
1 parent d39c88b commit ef5225b

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.github/workflows/code_test_and_deploy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
# This will only run on main by default.
1414
- cron: "0 0 1,15 * *"
1515

16+
# Cancel in-progress runs if a new run is triggered, except for main branch.
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
20+
1621
jobs:
1722
linting:
1823
runs-on: ubuntu-latest

.github/workflows/docs_build_and_deploy.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
pull_request:
1515
workflow_dispatch:
1616

17+
# Cancel in-progress runs if a new run is triggered, except for main branch.
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
21+
1722
jobs:
1823
build_sphinx_docs:
1924
name: Build Sphinx Docs

0 commit comments

Comments
 (0)