From 4f2ae76971b064ddbadf2123fbe46a6e66645fbe Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Tue, 12 Mar 2024 19:18:10 -0700 Subject: [PATCH] Add concurrency to presubmit jobs. --- .github/workflows/build_linux_packages.yml | 8 ++++++++ .github/workflows/build_python_packages.yml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/.github/workflows/build_linux_packages.yml b/.github/workflows/build_linux_packages.yml index 72c1ce1..e884bc0 100644 --- a/.github/workflows/build_linux_packages.yml +++ b/.github/workflows/build_linux_packages.yml @@ -19,6 +19,14 @@ on: required: true type: string +concurrency: + # A PR number if a pull request and otherwise the commit hash. This cancels + # queued and in-progress runs for the same PR (presubmit) or commit + # (postsubmit). The workflow name is prepended to avoid conflicts between + # different workflows. + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + jobs: build_linux_packages: name: Build Linux Packages diff --git a/.github/workflows/build_python_packages.yml b/.github/workflows/build_python_packages.yml index fce0a1d..4b39576 100644 --- a/.github/workflows/build_python_packages.yml +++ b/.github/workflows/build_python_packages.yml @@ -27,6 +27,14 @@ on: required: false type: string +concurrency: + # A PR number if a pull request and otherwise the commit hash. This cancels + # queued and in-progress runs for the same PR (presubmit) or commit + # (postsubmit). The workflow name is prepended to avoid conflicts between + # different workflows. + group: ${{ github.workflow }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + jobs: build_python_packages: name: Build Python Packages