mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
Enhance CI workflow with dynamic renderer inputs
Added workflow_dispatch inputs for renderer configuration and modified the renderer ref resolution logic.
This commit is contained in:
@@ -6,6 +6,16 @@ on:
|
|||||||
- main
|
- main
|
||||||
- 'feat/**'
|
- 'feat/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
renderer_repo:
|
||||||
|
description: 'Renderer repo (owner/name). Empty = auto from client branch.'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
renderer_ref:
|
||||||
|
description: 'Renderer git ref. Empty = auto from client branch.'
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
|
||||||
# Opt into the Node.js 24 runtime for the JavaScript actions
|
# Opt into the Node.js 24 runtime for the JavaScript actions
|
||||||
# (actions/checkout, actions/setup-node, …). Node 20 will be removed
|
# (actions/checkout, actions/setup-node, …). Node 20 will be removed
|
||||||
@@ -29,17 +39,61 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: Nitro-V3
|
path: Nitro-V3
|
||||||
|
|
||||||
# The client tracks renderer changes that are pushed to the
|
# Pick the renderer ref dynamically based on the client context.
|
||||||
# `feat/react19-event-bus` branch of `simoleo89/Nitro_Render_V3`
|
# Renderer repo is always upstream `duckietm/Nitro_Render_V3` —
|
||||||
# (allowUnderpass + sendBackgroundMessage + Window NitroConfig
|
# the two repos must stay wire-aligned (composer/parser
|
||||||
# alignment, etc.). `duckietm/Nitro_Render_V3:main` doesn't yet
|
# signatures); pairing `main` with a stale branch is what
|
||||||
# have those, so tsgo would fail right away if we checked that
|
# produced the "Expected 14-15 arguments, but got 16" failure on
|
||||||
# out instead.
|
# the catalog edit composer.
|
||||||
|
#
|
||||||
|
# Mapping:
|
||||||
|
# client `main` → duckietm/Nitro_Render_V3 @ main
|
||||||
|
# client `feat/**` → duckietm/Nitro_Render_V3 @ Dev
|
||||||
|
# PR base `main` → duckietm/Nitro_Render_V3 @ main
|
||||||
|
# PR base `Dev` (upstream) → duckietm/Nitro_Render_V3 @ Dev
|
||||||
|
# PR base `feat/**` → duckietm/Nitro_Render_V3 @ Dev
|
||||||
|
#
|
||||||
|
# Override via workflow_dispatch inputs when you need an ad-hoc
|
||||||
|
# pairing.
|
||||||
|
- name: Resolve renderer ref
|
||||||
|
id: renderer
|
||||||
|
run: |
|
||||||
|
REPO="${{ github.event.inputs.renderer_repo }}"
|
||||||
|
REF="${{ github.event.inputs.renderer_ref }}"
|
||||||
|
|
||||||
|
if [ -z "$REPO" ] || [ -z "$REF" ]; then
|
||||||
|
case "${GITHUB_EVENT_NAME}" in
|
||||||
|
pull_request)
|
||||||
|
CTX="${GITHUB_BASE_REF}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
CTX="${GITHUB_REF_NAME}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AUTO_REPO="duckietm/Nitro_Render_V3"
|
||||||
|
case "$CTX" in
|
||||||
|
main)
|
||||||
|
AUTO_REF="main"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
AUTO_REF="Dev"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
[ -z "$REPO" ] && REPO="$AUTO_REPO"
|
||||||
|
[ -z "$REF" ] && REF="$AUTO_REF"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "repo=$REPO" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "ref=$REF" >> "$GITHUB_OUTPUT"
|
||||||
|
echo "Resolved renderer pairing: $REPO @ $REF (client ctx: ${GITHUB_BASE_REF:-$GITHUB_REF_NAME}, event: ${GITHUB_EVENT_NAME})"
|
||||||
|
|
||||||
- name: Checkout Nitro_Render_V3 (sibling)
|
- name: Checkout Nitro_Render_V3 (sibling)
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: simoleo89/Nitro_Render_V3
|
repository: ${{ steps.renderer.outputs.repo }}
|
||||||
ref: feat/react19-event-bus
|
ref: ${{ steps.renderer.outputs.ref }}
|
||||||
path: Nitro_Render_V3
|
path: Nitro_Render_V3
|
||||||
|
|
||||||
- name: Setup Node 22
|
- name: Setup Node 22
|
||||||
|
|||||||
Reference in New Issue
Block a user