Skip to content

Commit

Permalink
Configure concurrency setting for actions
Browse files Browse the repository at this point in the history
We can set a concurrency setting for each of our actions so that pushing
to a branch cancels in-progress runs without conflicting with runs on
other branches

https://docs.github.com/en/actions/using-jobs/using-concurrency#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow
  • Loading branch information
kfdm committed Nov 2, 2023
1 parent c86ed4e commit b88e246
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docs:
name: Run tests
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
branches:
- "master"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
docker:
runs-on: ubuntu-20.04
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ on:
branches:
- master

# Allow one concurrent deployment
concurrency:
group: "pages"
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -58,4 +57,3 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit b88e246

Please sign in to comment.