Skip to content

chore(deps): update all patch dependencies (#4938) #929

chore(deps): update all patch dependencies (#4938)

chore(deps): update all patch dependencies (#4938) #929

Workflow file for this run

name: Ecosystem CI
on:
push:
branches: [main]
workflow_dispatch:
inputs:
branch:
description: 'The branch of the Ecosystem CI run'
required: true
default: 'main'
permissions:
# Allow commenting on commits
contents: write
# Allow commenting on issues
issues: write
jobs:
changes:
runs-on: ubuntu-latest
if: github.repository == 'web-infra-dev/rsbuild' && github.event_name != 'workflow_dispatch'
outputs:
changed: ${{ steps.changes.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Install Pnpm
run: |
npm install -g corepack@latest --force
corepack enable
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
predicate-quantifier: 'every'
filters: |
changed:
- "!**/*.md"
- "!**/*.mdx"
- "!**/_meta.json"
- "!**/dictionary.txt"
ecosystem_ci_notify:
name: Run Ecosystem CI With Notify
needs: changes
runs-on: ubuntu-latest
if: github.repository == 'web-infra-dev/rsbuild' && github.event_name != 'workflow_dispatch' && needs.changes.outputs.changed == 'true'
steps:
- name: Run Ecosystem CI with notify
id: eco_ci
continue-on-error: true
uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be # v1.6.5
with:
owner: 'rspack-contrib'
repo: 'rsbuild-ecosystem-ci'
workflow_file_name: 'ecosystem-ci-from-commit.yml'
github_token: ${{ secrets.REPO_RSBUILD_ECO_CI_GITHUB_TOKEN }}
ref: 'main'
client_payload: '{"commitSHA":"${{ github.sha }}","updateComment":true,"repo":"web-infra-dev/rsbuild","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}'
- name: Checkout
if: steps.eco_ci.outcome == 'failure'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: Install Pnpm
run: |
npm install -g corepack@latest --force
corepack enable
- name: Setup Node.js
if: steps.eco_ci.outcome == 'failure'
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0
with:
node-version: 22
cache: 'pnpm'
- name: Send Failure Notification
if: steps.eco_ci.outcome == 'failure'
shell: bash
run: ./scripts/alert/lark.js
env:
TITLE: Rsbuild Ecosystem CI failed
DESCRIPTION: |
commitID: [${{github.sha}}](${{github.server_url}}/${{github.repository}}/commit/${{github.sha}})
URL: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}
LARK_WEBHOOK_URL: ${{ secrets.LARK_WEBHOOK_URL }}
- name: Get CI Result
id: eco-ci-result
if: steps.eco_ci.outcome == 'failure'
uses: ./.github/actions/eco-ci-result
with:
workflow-output: ${{ toJson(steps.eco_ci.outputs) }}
- id: create-commit-comment
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
if: steps.eco_ci.outcome == 'failure'
name: Create Commit Comment
with:
script: |
await github.rest.repos.createCommitComment({
commit_sha: context.sha,
owner: 'web-infra-dev',
repo: 'rsbuild',
body: ${{ steps.eco-ci-result.outputs.result }}
})
ecosystem_ci:
name: Run Ecosystem CI
runs-on: ubuntu-latest
if: github.repository == 'web-infra-dev/rsbuild' && github.event_name == 'workflow_dispatch'
steps:
- id: get-pr-number
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
name: Get PR Number
with:
script: |
const { data: prs } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
})
const pr = prs.find(pr => pr.head.ref === context.payload.inputs.branch);
if(pr) {
console.log(`Get PR info: ${pr.url}`)
return {
num: pr.number,
branchName: pr.head.ref,
repo: pr.head.repo.full_name
}
} else {
console.log(`can't find PR for branch: ${context.payload.inputs.branch}`)
}
- id: create-comment
name: Create Comment
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
if: steps.get-pr-number.outputs.result
with:
result-encoding: string
script: |
const url = `${context.serverUrl}//${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`
const urlLink = `[Open](${url})`
const prData = ${{ steps.get-pr-number.outputs.result }}
const { data: comment } = await github.rest.issues.createComment({
issue_number: prData.num,
owner: 'web-infra-dev',
repo: 'rsbuild',
body: `⏳ Triggered ecosystem CI: ${urlLink}`
})
return comment.id
- name: Run Ecosystem CI
id: eco_ci
uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be # v1.6.5
continue-on-error: true
with:
owner: 'rspack-contrib'
repo: 'rsbuild-ecosystem-ci'
workflow_file_name: 'ecosystem-ci-selected.yml'
github_token: ${{ secrets.REPO_RSBUILD_ECO_CI_GITHUB_TOKEN }}
ref: 'main'
client_payload: '{"ref":"${{ github.event.inputs.branch }}","repo":"web-infra-dev/rsbuild","suite":"-","suiteRefType":"precoded","suiteRef":"precoded"}'
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- id: eco-ci-result
uses: ./.github/actions/eco-ci-result
name: Get CI Result
with:
workflow-output: ${{ toJson(steps.eco_ci.outputs) }}
- id: update-comment
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
if: steps.get-pr-number.outputs.result
name: Update Comment
with:
script: |
await github.rest.issues.updateComment({
owner: 'web-infra-dev',
repo: 'rsbuild',
comment_id: ${{ steps.create-comment.outputs.result }},
body: ${{ steps.eco-ci-result.outputs.result }}
})