11name : Ecosystem CI
22
33on :
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
1620jobs :
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
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