提交 69dc7d15 authored 作者: Brandon T. Willard's avatar Brandon T. Willard 提交者: Brandon T. Willard

Restrict Actions workflow concurrency group to pull requests

上级 430d068d
...@@ -9,8 +9,11 @@ on: ...@@ -9,8 +9,11 @@ on:
release: release:
types: [published] types: [published]
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency: concurrency:
group: ${{ github.head_ref }}-pypi # The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
......
...@@ -9,8 +9,11 @@ on: ...@@ -9,8 +9,11 @@ on:
branches: branches:
- main - main
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency: concurrency:
group: ${{ github.head_ref }}-tests # The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true cancel-in-progress: true
jobs: jobs:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论