Skip to content

Commit a68a9f9

Browse files
fi3eworkTimeless0911Copilot
authored
ci: add per commit notify (#1298)
Co-authored-by: Timeless0911 <50201324+Timeless0911@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 322dabe commit a68a9f9

File tree

1 file changed

+43
-5
lines changed

1 file changed

+43
-5
lines changed

.github/workflows/ecosystem-ci.yml

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Ecosystem CI
22

33
on:
4+
push:
5+
# TODO: change to `main` after testing.
6+
branches: [ci-test]
7+
48
workflow_dispatch:
59
inputs:
610
branch:
@@ -14,15 +18,34 @@ permissions:
1418
pull-requests: write
1519

1620
jobs:
17-
ecosystem_ci:
18-
name: Run Ecosystem CI
21+
changes:
22+
runs-on: ubuntu-latest
23+
if: github.repository == 'web-infra-dev/rslib' && github.event_name != 'workflow_dispatch'
24+
outputs:
25+
changed: ${{ steps.changes.outputs.changed }}
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
fetch-depth: 1
31+
32+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
33+
id: changes
34+
with:
35+
predicate-quantifier: 'every'
36+
filters: |
37+
changed:
38+
- "!**/*.md"
39+
- "!**/*.mdx"
40+
- "!**/_meta.json"
41+
- "!**/dictionary.txt"
42+
ecosystem_ci_dispatch:
43+
name: Dispatch ecosystem CI
1944
runs-on: ubuntu-latest
20-
if: github.repository == 'web-infra-dev/rslib'
45+
if: github.repository == 'web-infra-dev/rslib' && github.event_name == 'workflow_dispatch'
2146
steps:
2247
- name: Trigger Ecosystem CI
2348
uses: rspack-contrib/rstack-ecosystem-ci/.github/actions/ecosystem_ci_dispatch@main
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.REPO_RSLIB_ECO_CI_GITHUB_TOKEN }}
2649
with:
2750
github-token: ${{ secrets.REPO_RSLIB_ECO_CI_GITHUB_TOKEN }}
2851
ecosystem-owner: web-infra-dev
@@ -31,3 +54,18 @@ jobs:
3154
client-payload: '{"ref":"${{ github.event.inputs.branch }}","repo":"web-infra-dev/rslib","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}'
3255
result-heading: Rslib Ecosystem CI
3356
branch: ${{ github.event.inputs.branch }}
57+
ecosystem_ci_per_commit:
58+
name: Run ecosystem CI per commit
59+
needs: changes
60+
runs-on: ubuntu-latest
61+
if: github.repository == 'web-infra-dev/rslib' && github.event_name != 'workflow_dispatch' && needs.changes.outputs.changed == 'true'
62+
steps:
63+
- name: Trigger Ecosystem CI
64+
uses: rspack-contrib/rstack-ecosystem-ci/.github/actions/ecosystem_ci_per_commit@main
65+
with:
66+
github-token: ${{ secrets.REPO_RSLIB_ECO_CI_GITHUB_TOKEN }}
67+
ecosystem-owner: web-infra-dev
68+
ecosystem-repo: rslib
69+
workflow-file: rslib-ecosystem-ci-selected.yml
70+
client-payload: '{"commitSHA":"${{ github.sha }}","updateComment":true,"repo":"web-infra-dev/rslib","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}'
71+
result-heading: Rslib Ecosystem CI

0 commit comments

Comments
 (0)