From ed47321be3393a381954f13d97bd1971e19d3b15 Mon Sep 17 00:00:00 2001 From: pshu Date: Tue, 23 Jun 2026 15:09:26 +0800 Subject: [PATCH 1/3] ci: swap docker trigger-workflow-and-wait for JS workflow-dispatch convictional/trigger-workflow-and-wait is a Docker container action; on the mini runner there is no Docker daemon, so building its image fails. Replace it with the-actions-org/workflow-dispatch (node20) in both dispatch composite actions. Same wait/fail semantics; the downstream run id is fed to ecosystem-ci-result unchanged. --- .../actions/ecosystem_ci_dispatch/action.yaml | 22 ++++++++++--------- .../ecosystem_ci_per_commit/action.yaml | 22 ++++++++++--------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/actions/ecosystem_ci_dispatch/action.yaml b/.github/actions/ecosystem_ci_dispatch/action.yaml index 8868a996..e4708721 100644 --- a/.github/actions/ecosystem_ci_dispatch/action.yaml +++ b/.github/actions/ecosystem_ci_dispatch/action.yaml @@ -35,13 +35,13 @@ inputs: outputs: workflow-id: description: 'ID of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs.workflow_id }} + value: ${{ steps.eco_ci.outputs['workflow-id'] }} workflow-url: description: 'URL of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs.workflow_url }} + value: ${{ steps.eco_ci.outputs['workflow-url'] }} conclusion: description: 'Conclusion reported by the downstream workflow' - value: ${{ steps.eco_ci.outputs.conclusion }} + value: ${{ steps.eco_ci.outputs['workflow-conclusion'] }} summary: description: 'Formatted markdown summary of downstream job results' value: ${{ steps.eco-ci-result.outputs.summary }} @@ -116,15 +116,17 @@ runs: - id: eco_ci name: Run Ecosystem CI - uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be # v1.6.5 + uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # v4.0.0 continue-on-error: true with: - owner: rstackjs - repo: rstack-ecosystem-ci - workflow_file_name: ${{ inputs.workflow-file }} + repo: rstackjs/rstack-ecosystem-ci + workflow: ${{ inputs.workflow-file }} ref: main - github_token: ${{ inputs.github-token }} - client_payload: ${{ inputs.client-payload }} + token: ${{ inputs.github-token }} + inputs: ${{ inputs.client-payload }} + wait-for-completion: true + wait-for-completion-timeout: 3h + display-workflow-run-url: true - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -137,7 +139,7 @@ runs: with: job-prefix: ${{ inputs.job-name-prefix }} heading: ${{ inputs.ecosystem-repo }} - workflow-output: ${{ toJson(steps.eco_ci.outputs) }} + workflow-output: "{\"workflow_id\": \"${{ steps.eco_ci.outputs['workflow-id'] }}\"}" - id: update-comment name: Update Comment diff --git a/.github/actions/ecosystem_ci_per_commit/action.yaml b/.github/actions/ecosystem_ci_per_commit/action.yaml index 0d76b834..308be7c8 100644 --- a/.github/actions/ecosystem_ci_per_commit/action.yaml +++ b/.github/actions/ecosystem_ci_per_commit/action.yaml @@ -27,13 +27,13 @@ inputs: outputs: workflow-id: description: 'ID of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs.workflow_id }} + value: ${{ steps.eco_ci.outputs['workflow-id'] }} workflow-url: description: 'URL of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs.workflow_url }} + value: ${{ steps.eco_ci.outputs['workflow-url'] }} conclusion: description: 'Conclusion reported by the downstream workflow' - value: ${{ steps.eco_ci.outputs.conclusion }} + value: ${{ steps.eco_ci.outputs['workflow-conclusion'] }} summary: description: 'Formatted markdown summary of downstream job results' value: ${{ steps.eco-ci-result.outputs.summary }} @@ -47,14 +47,16 @@ runs: - name: Run Ecosystem CI with notify id: eco_ci continue-on-error: true - uses: convictional/trigger-workflow-and-wait@f69fa9eedd3c62a599220f4d5745230e237904be # v1.6.5 + uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # v4.0.0 with: - owner: rstackjs - repo: rstack-ecosystem-ci - workflow_file_name: ${{ inputs.workflow-file }} - github_token: ${{ inputs.github-token }} + repo: rstackjs/rstack-ecosystem-ci + workflow: ${{ inputs.workflow-file }} ref: 'main' - client_payload: ${{ inputs.client-payload }} + token: ${{ inputs.github-token }} + inputs: ${{ inputs.client-payload }} + wait-for-completion: true + wait-for-completion-timeout: 3h + display-workflow-run-url: true - name: Get CI Result id: eco-ci-result @@ -62,7 +64,7 @@ runs: with: job-prefix: ${{ inputs.job-name-prefix }} heading: ${{ inputs.ecosystem-repo }} - workflow-output: ${{ toJson(steps.eco_ci.outputs) }} + workflow-output: "{\"workflow_id\": \"${{ steps.eco_ci.outputs['workflow-id'] }}\"}" - id: create-commit-comment uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 From 0d8b599e67cb5201ce1f7f2faddfaafbac273d56 Mon Sep 17 00:00:00 2001 From: pshu Date: Tue, 23 Jun 2026 18:10:49 +0800 Subject: [PATCH 2/3] ci: switch dispatch to Codex- return-dispatch + await-remote-run (node24) node20 is being deprecated and the-actions-org/workflow-dispatch is node20. Use the Codex- two-step (node24): return-dispatch dispatches and returns the run id, await-remote-run polls it to completion. return-dispatch identifies the run by a distinct_id echoed in a step name, so the downstream workflow gains a distinct_id input plus a tiny ubuntu-latest echo job (wired on rspack-ecosystem-ci-from-pr.yml for verification; roll out to the rest once green). --- .../actions/ecosystem_ci_dispatch/action.yaml | 36 ++++++++++++------- .../ecosystem_ci_per_commit/action.yaml | 36 ++++++++++++------- .../workflows/rspack-ecosystem-ci-from-pr.yml | 14 ++++++++ 3 files changed, 60 insertions(+), 26 deletions(-) diff --git a/.github/actions/ecosystem_ci_dispatch/action.yaml b/.github/actions/ecosystem_ci_dispatch/action.yaml index e4708721..ee2f341c 100644 --- a/.github/actions/ecosystem_ci_dispatch/action.yaml +++ b/.github/actions/ecosystem_ci_dispatch/action.yaml @@ -35,13 +35,13 @@ inputs: outputs: workflow-id: description: 'ID of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs['workflow-id'] }} + value: ${{ steps.dispatch.outputs.run_id }} workflow-url: description: 'URL of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs['workflow-url'] }} + value: ${{ steps.dispatch.outputs.run_url }} conclusion: description: 'Conclusion reported by the downstream workflow' - value: ${{ steps.eco_ci.outputs['workflow-conclusion'] }} + value: ${{ steps.eco_ci.outcome }} summary: description: 'Formatted markdown summary of downstream job results' value: ${{ steps.eco-ci-result.outputs.summary }} @@ -114,19 +114,29 @@ runs: }) return comment.id - - id: eco_ci - name: Run Ecosystem CI - uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # v4.0.0 + - id: dispatch + name: Dispatch Ecosystem CI + uses: Codex-/return-dispatch@16fa9d14771c4d56ae0196bbda1d3c17f7f3650f # v3.0.2 continue-on-error: true with: - repo: rstackjs/rstack-ecosystem-ci - workflow: ${{ inputs.workflow-file }} + token: ${{ inputs.github-token }} ref: main + owner: rstackjs + repo: rstack-ecosystem-ci + workflow: ${{ inputs.workflow-file }} + workflow_inputs: ${{ inputs.client-payload }} + + - id: eco_ci + name: Await Ecosystem CI + uses: Codex-/await-remote-run@2512346665df8818ec7ad6aca3cdceb7626cd384 # v2.0.0 + continue-on-error: true + with: token: ${{ inputs.github-token }} - inputs: ${{ inputs.client-payload }} - wait-for-completion: true - wait-for-completion-timeout: 3h - display-workflow-run-url: true + owner: rstackjs + repo: rstack-ecosystem-ci + run_id: ${{ steps.dispatch.outputs.run_id }} + run_timeout_seconds: 10800 + poll_interval_ms: 30000 - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -139,7 +149,7 @@ runs: with: job-prefix: ${{ inputs.job-name-prefix }} heading: ${{ inputs.ecosystem-repo }} - workflow-output: "{\"workflow_id\": \"${{ steps.eco_ci.outputs['workflow-id'] }}\"}" + workflow-output: '{"run_id": "${{ steps.dispatch.outputs.run_id }}"}' - id: update-comment name: Update Comment diff --git a/.github/actions/ecosystem_ci_per_commit/action.yaml b/.github/actions/ecosystem_ci_per_commit/action.yaml index 308be7c8..1b9c7d57 100644 --- a/.github/actions/ecosystem_ci_per_commit/action.yaml +++ b/.github/actions/ecosystem_ci_per_commit/action.yaml @@ -27,13 +27,13 @@ inputs: outputs: workflow-id: description: 'ID of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs['workflow-id'] }} + value: ${{ steps.dispatch.outputs.run_id }} workflow-url: description: 'URL of the triggered downstream workflow run' - value: ${{ steps.eco_ci.outputs['workflow-url'] }} + value: ${{ steps.dispatch.outputs.run_url }} conclusion: description: 'Conclusion reported by the downstream workflow' - value: ${{ steps.eco_ci.outputs['workflow-conclusion'] }} + value: ${{ steps.eco_ci.outcome }} summary: description: 'Formatted markdown summary of downstream job results' value: ${{ steps.eco-ci-result.outputs.summary }} @@ -44,19 +44,29 @@ outputs: runs: using: composite steps: - - name: Run Ecosystem CI with notify - id: eco_ci + - name: Dispatch Ecosystem CI + id: dispatch continue-on-error: true - uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # v4.0.0 + uses: Codex-/return-dispatch@16fa9d14771c4d56ae0196bbda1d3c17f7f3650f # v3.0.2 with: - repo: rstackjs/rstack-ecosystem-ci - workflow: ${{ inputs.workflow-file }} + token: ${{ inputs.github-token }} ref: 'main' + owner: rstackjs + repo: rstack-ecosystem-ci + workflow: ${{ inputs.workflow-file }} + workflow_inputs: ${{ inputs.client-payload }} + + - name: Await Ecosystem CI + id: eco_ci + continue-on-error: true + uses: Codex-/await-remote-run@2512346665df8818ec7ad6aca3cdceb7626cd384 # v2.0.0 + with: token: ${{ inputs.github-token }} - inputs: ${{ inputs.client-payload }} - wait-for-completion: true - wait-for-completion-timeout: 3h - display-workflow-run-url: true + owner: rstackjs + repo: rstack-ecosystem-ci + run_id: ${{ steps.dispatch.outputs.run_id }} + run_timeout_seconds: 10800 + poll_interval_ms: 30000 - name: Get CI Result id: eco-ci-result @@ -64,7 +74,7 @@ runs: with: job-prefix: ${{ inputs.job-name-prefix }} heading: ${{ inputs.ecosystem-repo }} - workflow-output: "{\"workflow_id\": \"${{ steps.eco_ci.outputs['workflow-id'] }}\"}" + workflow-output: '{"run_id": "${{ steps.dispatch.outputs.run_id }}"}' - id: create-commit-comment uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9 diff --git a/.github/workflows/rspack-ecosystem-ci-from-pr.yml b/.github/workflows/rspack-ecosystem-ci-from-pr.yml index 3b798b1e..fdd274fa 100644 --- a/.github/workflows/rspack-ecosystem-ci-from-pr.yml +++ b/.github/workflows/rspack-ecosystem-ci-from-pr.yml @@ -55,8 +55,22 @@ on: required: true type: string default: 'precoded' + distinct_id: + description: 'Distinct ID injected by return-dispatch to identify this run' + required: false + type: string + default: '' jobs: + return-dispatch-id: + name: Return Dispatch ID + runs-on: ubuntu-latest + steps: + - name: Return Dispatch ID ${{ inputs.distinct_id }} + run: echo "${DISTINCT_ID}" + env: + DISTINCT_ID: ${{ inputs.distinct_id }} + get-runner-labels: name: Get Runner Labels uses: ./.github/workflows/get-runner-labels.yml From c741cf0a73d362fe92710975e695fa2d6a78d94e Mon Sep 17 00:00:00 2001 From: pshu Date: Tue, 23 Jun 2026 18:23:07 +0800 Subject: [PATCH 3/3] VERIFY ONLY: dispatch downstream on feature branch (revert before finalize) --- .github/actions/ecosystem_ci_dispatch/action.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/ecosystem_ci_dispatch/action.yaml b/.github/actions/ecosystem_ci_dispatch/action.yaml index ee2f341c..512d040c 100644 --- a/.github/actions/ecosystem_ci_dispatch/action.yaml +++ b/.github/actions/ecosystem_ci_dispatch/action.yaml @@ -120,7 +120,7 @@ runs: continue-on-error: true with: token: ${{ inputs.github-token }} - ref: main + ref: ci/dockerless-workflow-dispatch owner: rstackjs repo: rstack-ecosystem-ci workflow: ${{ inputs.workflow-file }}