[openwrt/openwrt] CI: add concurrency limits for pr test
LEDE Commits
lede-commits at lists.infradead.org
Wed Jan 11 05:32:01 PST 2023
ansuel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cb679adf184d30261368707cd2b4f6cc7cf2a686
commit cb679adf184d30261368707cd2b4f6cc7cf2a686
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Jan 11 13:52:38 2023 +0100
CI: add concurrency limits for pr test
Add concurrency limits for pull request test so that on pull request
refresh old jobs are cancelled.
The group is created based on the github ref + workflow name and the
workflow is cancelled only it it comes from a pull_request event.
Push events are not affected by this limit.
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
.github/workflows/kernel.yml | 4 ++++
.github/workflows/packages.yml | 4 ++++
.github/workflows/toolchain.yml | 4 ++++
.github/workflows/tools.yml | 4 ++++
4 files changed, 16 insertions(+)
diff --git a/.github/workflows/kernel.yml b/.github/workflows/kernel.yml
index 6cff102091..bc39eb359c 100644
--- a/.github/workflows/kernel.yml
+++ b/.github/workflows/kernel.yml
@@ -21,6 +21,10 @@ on:
permissions:
contents: read
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
jobs:
determine_targets:
name: Set targets
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
index 7bcaa2b3d3..340ee0c204 100644
--- a/.github/workflows/packages.yml
+++ b/.github/workflows/packages.yml
@@ -23,6 +23,10 @@ on:
permissions:
contents: read
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
jobs:
build:
name: Build Packages with external toolchain
diff --git a/.github/workflows/toolchain.yml b/.github/workflows/toolchain.yml
index d6abab4dec..2a24d82e30 100644
--- a/.github/workflows/toolchain.yml
+++ b/.github/workflows/toolchain.yml
@@ -15,6 +15,10 @@ on:
permissions:
contents: read
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
jobs:
determine_targets:
name: Set targets
diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml
index 69ee456bce..19c11f03a6 100644
--- a/.github/workflows/tools.yml
+++ b/.github/workflows/tools.yml
@@ -15,6 +15,10 @@ on:
permissions:
contents: read
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
jobs:
build-macos-latest:
name: Build tools with macos latest
More information about the lede-commits
mailing list