rspack react-ts project integrate formily failed,less-loader resolve error occurred.(rspack的react-ts项目集成formily失败,less-loader出现解析错误) #2953
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ecosystem-ci trigger | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
trigger: | |
runs-on: ubuntu-latest | |
if: github.repository == 'web-infra-dev/rspack' && github.event.issue.pull_request && startsWith(github.event.comment.body, '!eco-ci') | |
steps: | |
- uses: actions/github-script@v6 | |
with: | |
script: | | |
const user = context.payload.sender.login | |
console.log(`Validate user: ${user}`) | |
let hasTriagePermission = false | |
try { | |
const { data } = await github.rest.repos.getCollaboratorPermissionLevel({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
username: user, | |
}); | |
hasTriagePermission = data.user.permissions.triage | |
} catch (e) { | |
console.warn(e) | |
} | |
if (hasTriagePermission) { | |
console.log('Allowed') | |
await github.rest.reactions.createForIssueComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
comment_id: context.payload.comment.id, | |
content: '+1', | |
}) | |
} else { | |
console.log('Not allowed') | |
await github.rest.reactions.createForIssueComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
comment_id: context.payload.comment.id, | |
content: '-1', | |
}) | |
throw new Error('not allowed') | |
} | |
- uses: actions/github-script@v6 | |
id: get-pr-data | |
with: | |
script: | | |
console.log(`Get PR info: ${context.repo.owner}/${context.repo.repo}#${context.issue.number}`) | |
const { data: pr } = await github.rest.pulls.get({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.issue.number | |
}) | |
return { | |
num: context.issue.number, | |
branchName: pr.head.ref, | |
repo: pr.head.repo.full_name | |
} | |
- uses: actions/github-script@v6 | |
id: trigger | |
env: | |
COMMENT: ${{ github.event.comment.body }} | |
with: | |
github-token: ${{ secrets.ECOSYSTEM_CI_ACCESS_TOKEN }} | |
result-encoding: string | |
script: | | |
const comment = process.env.COMMENT.trim() | |
const prData = ${{ steps.get-pr-data.outputs.result }} | |
const suite = comment.split('\n')[0].replace(/^!eco-ci/, '').trim() | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: 'rspack-ecosystem-ci', | |
workflow_id: 'ecosystem-ci-from-pr.yml', | |
ref: 'main', | |
inputs: { | |
prNumber: '' + prData.num, | |
branchName: prData.branchName, | |
repo: prData.repo, | |
suite: suite === '' ? '-' : suite | |
} | |
}) |