summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorCYFS <[email protected]>2025-10-01 11:00:07 +0800
committerGitHub <[email protected]>2025-10-01 11:00:07 +0800
commitd9a6a5307bc915fd715c170c4626f1c4f264651e (patch)
tree22acf9165f7566394976c70507b34befeae7f3be /.github/workflows
parent3dd4f71bb6bd546757f591e1ed61e8b96ae95352 (diff)
[github][ci]: add concurrency control to GitHub Actions (#10761)
ci: add concurrency control to GitHub Actions
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/action_tools.yml6
-rw-r--r--.github/workflows/auto_assign_reviewers.yml4
-rw-r--r--.github/workflows/auto_labeler.yml4
-rw-r--r--.github/workflows/bsp_buildings.yml4
-rw-r--r--.github/workflows/compile_bsp_with_drivers.yml6
-rw-r--r--.github/workflows/doxygen.yml6
-rw-r--r--.github/workflows/format_check.yml6
-rw-r--r--.github/workflows/pkgs_test.yml7
-rw-r--r--.github/workflows/pr_clang_format.yml6
-rw-r--r--.github/workflows/pr_format_bot.yml7
-rw-r--r--.github/workflows/static_code_analysis.yml6
-rw-r--r--.github/workflows/utest_auto_run.yml4
12 files changed, 57 insertions, 9 deletions
diff --git a/.github/workflows/action_tools.yml b/.github/workflows/action_tools.yml
index 7c29a6e7ff..b3e1b954d4 100644
--- a/.github/workflows/action_tools.yml
+++ b/.github/workflows/action_tools.yml
@@ -29,6 +29,10 @@ on:
workflow_dispatch:
repository_dispatch:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
permissions:
contents: read # to fetch code (actions/checkout)
@@ -93,4 +97,4 @@ jobs:
scons --pyconfig-silent -C $TEST_BSP_ROOT/dist/project
scons --pyconfig-silent -C $TEST_BSP_ROOT/rt-studio-project
scons -C $TEST_BSP_ROOT/dist/project
- scons -C $TEST_BSP_ROOT/rt-studio-project
+ scons -C $TEST_BSP_ROOT/rt-studio-project \ No newline at end of file
diff --git a/.github/workflows/auto_assign_reviewers.yml b/.github/workflows/auto_assign_reviewers.yml
index cde7d3dbca..1c75b8388e 100644
--- a/.github/workflows/auto_assign_reviewers.yml
+++ b/.github/workflows/auto_assign_reviewers.yml
@@ -20,6 +20,10 @@ on:
branches: [ master ]
types: [opened, synchronize, reopened]
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
assign-reviewers:
runs-on: ubuntu-22.04
diff --git a/.github/workflows/auto_labeler.yml b/.github/workflows/auto_labeler.yml
index e75f90740d..e5c1c2d9ce 100644
--- a/.github/workflows/auto_labeler.yml
+++ b/.github/workflows/auto_labeler.yml
@@ -15,6 +15,10 @@ name: "Pull Request Labeler"
on:
- pull_request_target
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
labeler:
permissions:
diff --git a/.github/workflows/bsp_buildings.yml b/.github/workflows/bsp_buildings.yml
index 388f6f2354..b2b7d7eb18 100644
--- a/.github/workflows/bsp_buildings.yml
+++ b/.github/workflows/bsp_buildings.yml
@@ -47,6 +47,10 @@ on:
- online-pkgs-static-building-trigger-event
workflow_dispatch:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
permissions:
contents: read # to fetch code (actions/checkout)
diff --git a/.github/workflows/compile_bsp_with_drivers.yml b/.github/workflows/compile_bsp_with_drivers.yml
index 97a5deded6..d9205c735f 100644
--- a/.github/workflows/compile_bsp_with_drivers.yml
+++ b/.github/workflows/compile_bsp_with_drivers.yml
@@ -15,6 +15,10 @@ name: BSP compilation with more drivers
on:
workflow_dispatch: #disable
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
permissions:
contents: read # to fetch code (actions/checkout)
@@ -54,4 +58,4 @@ jobs:
shell: bash
run: |
# source ~/.env/env.sh
- # python tools/ci/compile_bsp_with_drivers.py
+ # python tools/ci/compile_bsp_with_drivers.py \ No newline at end of file
diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml
index e2c51a8625..151d89b1fd 100644
--- a/.github/workflows/doxygen.yml
+++ b/.github/workflows/doxygen.yml
@@ -31,6 +31,10 @@ on:
schedule:
- cron: '0 16 30 * *'
workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
permissions:
contents: read
@@ -74,4 +78,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
- uses: actions/deploy-pages@main
+ uses: actions/deploy-pages@main \ No newline at end of file
diff --git a/.github/workflows/format_check.yml b/.github/workflows/format_check.yml
index 0273c11d9b..5c40a91a16 100644
--- a/.github/workflows/format_check.yml
+++ b/.github/workflows/format_check.yml
@@ -9,6 +9,10 @@ on:
- '**/README.md'
- '**/README_zh.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
scancode_job:
runs-on: ubuntu-22.04
@@ -25,4 +29,4 @@ jobs:
shell: bash
run: |
pip install click chardet PyYaml
- python tools/ci/file_check.py check 'https://github.com/RT-Thread/rt-thread' 'master'
+ python tools/ci/file_check.py check 'https://github.com/RT-Thread/rt-thread' 'master' \ No newline at end of file
diff --git a/.github/workflows/pkgs_test.yml b/.github/workflows/pkgs_test.yml
index 87e70fb35c..1ef1b2fa22 100644
--- a/.github/workflows/pkgs_test.yml
+++ b/.github/workflows/pkgs_test.yml
@@ -17,6 +17,10 @@ on:
- '**/README_zh.md'
workflow_dispatch:
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
change:
uses: RT-Thread/pkgs-test/.github/workflows/pkgs-action.yml@main
@@ -25,5 +29,4 @@ jobs:
rt-thread-versions: "branch:master"
test-specific-pkgs: true
pkgs: |
- hello
-
+ hello \ No newline at end of file
diff --git a/.github/workflows/pr_clang_format.yml b/.github/workflows/pr_clang_format.yml
index 2e2dd16d4a..1f4d1fdc62 100644
--- a/.github/workflows/pr_clang_format.yml
+++ b/.github/workflows/pr_clang_format.yml
@@ -16,6 +16,10 @@ on:
required: true
default: ''
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
permissions:
contents: write
pull-requests: read
@@ -262,4 +266,4 @@ jobs:
echo "排除模式: ${{ github.event.inputs.exclude_patterns || '无' }}"
echo "处理文件数: ${{ steps.find-files.outputs.files_count }}"
echo "有更改: ${{ steps.check-changes.outputs.has_changes }}"
- echo "clang-format 版本: $(clang-format --version | head -1)"
+ echo "clang-format 版本: $(clang-format --version | head -1)" \ No newline at end of file
diff --git a/.github/workflows/pr_format_bot.yml b/.github/workflows/pr_format_bot.yml
index 25628013a4..3e2ee2ba14 100644
--- a/.github/workflows/pr_format_bot.yml
+++ b/.github/workflows/pr_format_bot.yml
@@ -3,6 +3,11 @@ on:
pull_request_target:
types: [opened]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
permissions:
pull-requests: write
contents: read
@@ -133,4 +138,4 @@ jobs:
echo "Failed to get commits from GitHub API"
echo "Response: $commits"
exit 1
- fi
+ fi \ No newline at end of file
diff --git a/.github/workflows/static_code_analysis.yml b/.github/workflows/static_code_analysis.yml
index 9e2d4b4e93..3a5fdb34f5 100644
--- a/.github/workflows/static_code_analysis.yml
+++ b/.github/workflows/static_code_analysis.yml
@@ -19,6 +19,10 @@ on:
- '**/README.md'
- '**/README_zh.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
jobs:
scancode_job:
runs-on: ubuntu-22.04
@@ -50,4 +54,4 @@ jobs:
sudo make install FILESDIR=/usr/local/share/Cppcheck
cppcheck --version
cd ..
- python tools/ci/cpp_check.py check
+ python tools/ci/cpp_check.py check \ No newline at end of file
diff --git a/.github/workflows/utest_auto_run.yml b/.github/workflows/utest_auto_run.yml
index a1abf0a1dd..1bc6301029 100644
--- a/.github/workflows/utest_auto_run.yml
+++ b/.github/workflows/utest_auto_run.yml
@@ -19,6 +19,10 @@ on:
- '**/README.md'
- '**/README_zh.md'
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
permissions:
contents: read