From 64f86c2187aa24513770c8d807b47763381d0057 Mon Sep 17 00:00:00 2001 From: lin onetwo Date: Tue, 11 Nov 2025 23:13:41 +0800 Subject: [PATCH] ci: Uses TiddlyWiki/cerebrus@v5, and replaces obsolete workflow (#9423) * refactor: use TiddlyWiki/cerebrus@v5, and rename yml * continue-on-error: false * Update .github/workflows/pr-validation.yml to restrict contents permissions Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Saq Imtiaz Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/pr-check-build-size.yml | 2 +- .github/workflows/pr-comment-build-size.yml | 2 +- .github/workflows/pr-path-validation.yml | 18 ---------- .github/workflows/pr-validation.yml | 37 +++++++++++++++++++++ 4 files changed, 39 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/pr-path-validation.yml create mode 100644 .github/workflows/pr-validation.yml diff --git a/.github/workflows/pr-check-build-size.yml b/.github/workflows/pr-check-build-size.yml index 8512a30d4e..255a96626d 100644 --- a/.github/workflows/pr-check-build-size.yml +++ b/.github/workflows/pr-check-build-size.yml @@ -20,7 +20,7 @@ jobs: steps: - name: build-size-check id: get_sizes - uses: TiddlyWiki/cerebrus@v4 + uses: TiddlyWiki/cerebrus@v5 with: pr_number: ${{ github.event.pull_request.number }} repo: ${{ github.repository }} diff --git a/.github/workflows/pr-comment-build-size.yml b/.github/workflows/pr-comment-build-size.yml index 8421d99c8d..96b4e391f8 100644 --- a/.github/workflows/pr-comment-build-size.yml +++ b/.github/workflows/pr-comment-build-size.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Build and check size - uses: TiddlyWiki/cerebrus@v4 + uses: TiddlyWiki/cerebrus@v5 with: pr_number: ${{ inputs.pr_number }} repo: ${{ github.repository }} diff --git a/.github/workflows/pr-path-validation.yml b/.github/workflows/pr-path-validation.yml deleted file mode 100644 index 674a9115bd..0000000000 --- a/.github/workflows/pr-path-validation.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Validate PR Paths - -on: - pull_request_target: - types: [opened, reopened, synchronize] - -jobs: - validate-pr: - runs-on: ubuntu-latest - - steps: - - name: Validate PR - uses: TiddlyWiki/cerebrus@v4 - with: - pr_number: ${{ github.event.pull_request.number }} - repo: ${{ github.repository }} - base_ref: ${{ github.base_ref }} - github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml new file mode 100644 index 0000000000..1cc8586529 --- /dev/null +++ b/.github/workflows/pr-validation.yml @@ -0,0 +1,37 @@ +name: PR Validation + +on: + pull_request_target: + types: [opened, reopened, synchronize] + +permissions: + contents: read + pull-requests: write + issues: write +jobs: + validate-pr: + runs-on: ubuntu-latest + + steps: + # Step 1: Validate PR paths + - name: Validate PR Paths + uses: TiddlyWiki/cerebrus@v5 + with: + pr_number: ${{ github.event.pull_request.number }} + repo: ${{ github.repository }} + base_ref: ${{ github.base_ref }} + github_token: ${{ secrets.GITHUB_TOKEN }} + mode: rules + continue-on-error: true + + # Step 2: Validate change notes + - name: Validate Change Notes + uses: TiddlyWiki/cerebrus@v5 + with: + pr_number: ${{ github.event.pull_request.number }} + repo: ${{ github.repository }} + base_ref: ${{ github.base_ref }} + github_token: ${{ secrets.GITHUB_TOKEN }} + mode: changenotes + continue-on-error: false +