chore: limit concurrency for build jobs (#4929)
* Configure build jobs to cancel previous builds when new changes are pushed to a pull request branch, and serialize builds when running in a branch from a push event * Reduce privileges of GitHub token for scripts workflow
This commit is contained in:
7
.github/workflows/docs-preview.yaml
vendored
7
.github/workflows/docs-preview.yaml
vendored
@ -17,6 +17,13 @@ permissions:
|
||||
security-events: none
|
||||
statuses: none
|
||||
|
||||
# Cancel in-progress runs for pull requests when developers push
|
||||
# additional changes, and serialize builds in branches.
|
||||
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-to-cancel-any-in-progress-job-or-run
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
preview:
|
||||
name: Docs preview
|
||||
|
Reference in New Issue
Block a user