Apply concurrency control to swift-package-test, cancelling previously running workflows of the same kind#111
Apply concurrency control to swift-package-test, cancelling previously running workflows of the same kind#111TTOzzi wants to merge 1 commit into
Conversation
|
It seems that in workflows like this one, where multiple |
…y running workflows of the same kind
|
Currently, when the I’ve tried several approaches based on GitHub’s documentation, but so far, it seems the only way to avoid this is to explicitly pass a unique identifier from each job in the parent workflow to the However, requiring such an ID as an input parameter would affect all existing workflows that use |
|
As long as there are cases where |
|
|
||
| ## We are cancelling previously triggered workflow runs | ||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}-package-test |
There was a problem hiding this comment.
While I could tell which PR it was and whether it was the linux-build or windows-build job inside swift_package_test, there was no way — using only the information available within swift_package_test — to determine whether it was triggered from tests_with_docker or tests_without_docker in the parent workflow.
Hello! 👋
This change is derived from swiftlang/swift-format#976.
It adds concurrency control to ensure that only one active workflow is running per pull request, preventing duplicate workflow executions for open PRs.