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:
Jonathan Yu
2022-03-01 15:03:39 -08:00
committed by GitHub
parent 2c785779b5
commit 83269ba658
7 changed files with 61 additions and 0 deletions

View File

@@ -10,6 +10,13 @@ on:
# Runs every Monday morning PST
- cron: "17 15 * * 1"
# 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:
analyze:
name: Analyze