Skip to content

Commit

Permalink
GitHub Actions: Fix unexpected cancellations
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjankoehler committed Dec 11, 2024
1 parent 5d463eb commit 7e1dac1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,15 @@ jobs:
call-publish-pypi:
name: "Trigger workflow to publish distribution 📦s to PyPI/TestPyPI"
needs: build_and_test
concurrency:
group: ${{ concurrency.group }}-publish-pypi
cancel-in-progress: true
uses: ./.github/workflows/publish-pypi.yml

call-publish-reports-github-pages:
name: "Trigger workflow to publish reports to GitHub Pages"
needs: build_and_test
concurrency:
group: ${{ concurrency.group }}-publish-reports-github-pages
cancel-in-progress: true
uses: ./.github/workflows/publish-reports-github-pages.yml

8 changes: 4 additions & 4 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ on:
workflow_call:
release:
types: [published]

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
# NOTE: concurrency settings must be defined in calling workflow!
# otherwise unexpected cancellations will happen
# example error: "Canceling since a higher priority waiting request for 'martinjankoehler/klayout-pex-release-v0.1.4-Multi-platform Python/C++ build/test' exists"

jobs:
publish-test-pypi:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-reports-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ name: "Publish test/coverage/lint reports to GitHub Pages"
on:
workflow_call:

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true
# NOTE: concurrency settings must be defined in calling workflow!
# otherwise unexpected cancellations will happen
# example error: "Canceling since a higher priority waiting request for 'martinjankoehler/klayout-pex-release-v0.1.4-Multi-platform Python/C++ build/test' exists"

jobs:
allure-report:
Expand Down

0 comments on commit 7e1dac1

Please sign in to comment.