From 2d6ae37445175f9d4645e4d42253b2f8d0fb2f95 Mon Sep 17 00:00:00 2001 From: fi3ework Date: Tue, 28 Oct 2025 20:04:16 +0800 Subject: [PATCH 1/3] ci: add per commit notify --- .github/workflows/ecosystem-ci.yml | 48 ++++++++++++++++++++++++++---- 1 file changed, 43 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml index 955a24dd6..31c108ce2 100644 --- a/.github/workflows/ecosystem-ci.yml +++ b/.github/workflows/ecosystem-ci.yml @@ -1,6 +1,10 @@ name: Ecosystem CI on: + push: + # TODO: change to `main` after testing. + branches: [ci-test] + workflow_dispatch: inputs: branch: @@ -14,15 +18,34 @@ permissions: pull-requests: write jobs: - ecosystem_ci: - name: Run Ecosystem CI + changes: + runs-on: ubuntu-latest + if: github.repository == 'web-infra-dev/rsbuild' && github.event_name != 'workflow_dispatch' + outputs: + changed: ${{ steps.changes.outputs.changed }} + steps: + - name: Checkout + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + fetch-depth: 1 + + - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + id: changes + with: + predicate-quantifier: 'every' + filters: | + changed: + - "!**/*.md" + - "!**/*.mdx" + - "!**/_meta.json" + - "!**/dictionary.txt" + ecosystem_ci_dispatch: + name: Dispatch ecosystem CI runs-on: ubuntu-latest - if: github.repository == 'web-infra-dev/rslib' + if: github.repository == 'web-infra-dev/rslib' && github.event_name == 'workflow_dispatch' steps: - name: Trigger Ecosystem CI uses: rspack-contrib/rstack-ecosystem-ci/.github/actions/ecosystem_ci_dispatch@main - env: - GITHUB_TOKEN: ${{ secrets.REPO_RSLIB_ECO_CI_GITHUB_TOKEN }} with: github-token: ${{ secrets.REPO_RSLIB_ECO_CI_GITHUB_TOKEN }} ecosystem-owner: web-infra-dev @@ -31,3 +54,18 @@ jobs: client-payload: '{"ref":"${{ github.event.inputs.branch }}","repo":"web-infra-dev/rslib","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}' result-heading: Rslib Ecosystem CI branch: ${{ github.event.inputs.branch }} + ecosystem_ci_per_commit: + name: Run ecosystem CI per commit + needs: changes + runs-on: ubuntu-latest + if: github.repository == 'web-infra-dev/rslib' && github.event_name != 'workflow_dispatch' && needs.changes.outputs.changed == 'true' + steps: + - name: Trigger Ecosystem CI + uses: rspack-contrib/rstack-ecosystem-ci/.github/actions/ecosystem_ci_per_commit@main + with: + github-token: ${{ secrets.REPO_RSLIB_ECO_CI_GITHUB_TOKEN }} + ecosystem-owner: web-infra-dev + ecosystem-repo: rslib + workflow-file: rslib-ecosystem-ci-selected.yml + client-payload: '{"commitSHA":"${{ github.sha }}","updateComment":true,"repo":"web-infra-dev/rsbuild","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}' + result-heading: Rslib Ecosystem CI From 6aeee01737b381e4c5e674032c31f6d0a36df72e Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Tue, 28 Oct 2025 20:07:55 +0800 Subject: [PATCH 2/3] Update .github/workflows/ecosystem-ci.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/ecosystem-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml index 31c108ce2..b8f5db4ad 100644 --- a/.github/workflows/ecosystem-ci.yml +++ b/.github/workflows/ecosystem-ci.yml @@ -20,7 +20,7 @@ permissions: jobs: changes: runs-on: ubuntu-latest - if: github.repository == 'web-infra-dev/rsbuild' && github.event_name != 'workflow_dispatch' + if: github.repository == 'web-infra-dev/rslib' && github.event_name != 'workflow_dispatch' outputs: changed: ${{ steps.changes.outputs.changed }} steps: From e2444a1df2aa039fa5e3615cf656009242b8a465 Mon Sep 17 00:00:00 2001 From: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Date: Tue, 28 Oct 2025 20:08:25 +0800 Subject: [PATCH 3/3] Update .github/workflows/ecosystem-ci.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/ecosystem-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ecosystem-ci.yml b/.github/workflows/ecosystem-ci.yml index b8f5db4ad..a9cab2aa4 100644 --- a/.github/workflows/ecosystem-ci.yml +++ b/.github/workflows/ecosystem-ci.yml @@ -67,5 +67,5 @@ jobs: ecosystem-owner: web-infra-dev ecosystem-repo: rslib workflow-file: rslib-ecosystem-ci-selected.yml - client-payload: '{"commitSHA":"${{ github.sha }}","updateComment":true,"repo":"web-infra-dev/rsbuild","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}' + client-payload: '{"commitSHA":"${{ github.sha }}","updateComment":true,"repo":"web-infra-dev/rslib","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}' result-heading: Rslib Ecosystem CI