Skip to content

Commit 0a3cca7

Browse files
authored
ci: add ecosystem CI (#2710)
1 parent 7a1a4e0 commit 0a3cca7

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/ecosystem-ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Ecosystem CI
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
workflow_dispatch:
7+
inputs:
8+
branch:
9+
description: 'The branch of the Ecosystem CI run'
10+
required: true
11+
default: 'main'
12+
13+
permissions:
14+
contents: write
15+
issues: write
16+
pull-requests: write
17+
18+
jobs:
19+
changes:
20+
runs-on: ubuntu-latest
21+
if: github.repository == 'web-infra-dev/rspress' && github.event_name != 'workflow_dispatch'
22+
outputs:
23+
changed: ${{ steps.changes.outputs.changed }}
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
27+
with:
28+
fetch-depth: 1
29+
30+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
31+
id: changes
32+
with:
33+
predicate-quantifier: 'every'
34+
filters: |
35+
changed:
36+
- "!**/*.md"
37+
- "!**/*.mdx"
38+
- "!**/_meta.json"
39+
- "!**/dictionary.txt"
40+
- "!document/**"
41+
42+
ecosystem_ci_dispatch:
43+
name: Dispatch ecosystem CI
44+
runs-on: ubuntu-latest
45+
if: github.repository == 'web-infra-dev/rspress' && github.event_name == 'workflow_dispatch'
46+
steps:
47+
- name: Trigger Ecosystem CI
48+
uses: rspack-contrib/rstack-ecosystem-ci/.github/actions/ecosystem_ci_dispatch@main
49+
with:
50+
github-token: ${{ secrets.REPO_rspress_ECO_CI_GITHUB_TOKEN_NEXT }}
51+
ecosystem-owner: web-infra-dev
52+
ecosystem-repo: rspress
53+
workflow-file: rspress-ecosystem-ci-selected.yml
54+
client-payload: '{"ref":"${{ github.event.inputs.branch }}","repo":"web-infra-dev/rspress","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}'
55+
branch: ${{ github.event.inputs.branch }}
56+
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/rspress' && 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_RSPRESS_ECO_CI_GITHUB_TOKEN_NEXT }}
67+
ecosystem-owner: web-infra-dev
68+
ecosystem-repo: rspress
69+
workflow-file: rspress-ecosystem-ci-from-commit.yml
70+
client-payload: '{"commitSHA":"${{ github.sha }}","updateComment":true,"repo":"web-infra-dev/rspress","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}'

0 commit comments

Comments
 (0)