-
-
Notifications
You must be signed in to change notification settings - Fork 805
76 lines (72 loc) · 2.39 KB
/
ecosystem-ci.yml
File metadata and controls
76 lines (72 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Ecosystem CI
on:
workflow_dispatch:
inputs:
pr:
type: number
description: 'Run ecosystem CI on PR number'
required: true
suite:
description: 'testsuite to run. runs all test suites when `-`.'
required: false
type: choice
options:
- '-'
- modernjs
- rspress
- rsbuild
- rslib
- rstest
- rsdoctor
- examples
- devserver
- plugin
- lynx-stack
- rsbuild-rsc-plugin
suiteRefType:
description: 'type of suite ref to use'
required: true
type: choice
options:
- precoded
- branch
- tag
- commit
default: 'precoded'
suiteRef:
description: 'suite ref to use'
required: true
type: string
default: 'precoded'
permissions:
contents: write
issues: write
pull-requests: write
jobs:
ecosystem_ci_dispatch:
name: Dispatch ecosystem CI
runs-on: ubuntu-latest
if: github.repository == 'web-infra-dev/rspack'
steps:
- name: Get PR info
id: pr-info
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.inputs.pr }},
});
core.setOutput('branch', pr.head.ref);
core.setOutput('repo', pr.head.repo.full_name);
- name: Trigger Ecosystem CI
uses: rstackjs/rstack-ecosystem-ci/.github/actions/ecosystem_ci_dispatch@ca8d345a115158ea5ab3807378357f2162be7467 # v0.3.1
with:
github-token: ${{ secrets.REPO_RSTACK_ECO_CI_GITHUB_TOKEN }}
ecosystem-owner: web-infra-dev
ecosystem-repo: rspack
workflow-file: rspack-ecosystem-ci-from-pr.yml
pr-number: ${{ github.event.inputs.pr }}
client-payload: '{"prNumber":"${{ github.event.inputs.pr }}","branchName":"${{ steps.pr-info.outputs.branch }}","repo":"${{ steps.pr-info.outputs.repo }}","suite":"${{ github.event.inputs.suite || ''-'' }}","suiteRefType":"${{ github.event.inputs.suiteRefType }}","suiteRef":"${{ github.event.inputs.suiteRef }}"}'
branch: ${{ steps.pr-info.outputs.branch }}