mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
Merge branch 'duckietm:main' into main
This commit is contained in:
+47
-26
@@ -4,16 +4,17 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- Dev
|
||||
- 'feat/**'
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
renderer_repo:
|
||||
description: 'Renderer repo (owner/name). Empty = auto from client branch.'
|
||||
description: 'Renderer repo (owner/name). Empty = vars.RENDERER_REPO or upstream default.'
|
||||
required: false
|
||||
default: ''
|
||||
renderer_ref:
|
||||
description: 'Renderer git ref. Empty = auto from client branch.'
|
||||
description: 'Renderer git ref. Empty = vars.RENDERER_REF or auto (main on client main, else Dev).'
|
||||
required: false
|
||||
default: ''
|
||||
|
||||
@@ -24,6 +25,11 @@ on:
|
||||
# it on every run.
|
||||
env:
|
||||
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
|
||||
# Upstream renderer used as the fallback when nothing else is
|
||||
# configured. Override per-fork via the RENDERER_REPO / RENDERER_REF
|
||||
# repository variables (Settings → Secrets and variables → Actions →
|
||||
# Variables) or, for one-off runs, via the workflow_dispatch inputs.
|
||||
UPSTREAM_RENDERER_REPO: 'duckietm/Nitro_Render_V3'
|
||||
|
||||
jobs:
|
||||
check:
|
||||
@@ -39,33 +45,32 @@ jobs:
|
||||
with:
|
||||
path: Nitro-V3
|
||||
|
||||
# Pick the renderer ref dynamically based on the client context.
|
||||
# Resolve the renderer pairing with a clear precedence, from most
|
||||
# specific to most generic — no fork names or feature branches are
|
||||
# hardcoded in this workflow:
|
||||
#
|
||||
# 1. workflow_dispatch inputs (renderer_repo / renderer_ref)
|
||||
# → explicit manual override, wins outright.
|
||||
# 2. repository variables (vars.RENDERER_REPO / vars.RENDERER_REF)
|
||||
# → per-fork config set under Settings → Variables, applies
|
||||
# to push and pull_request runs without editing this file.
|
||||
# 3. upstream default
|
||||
# → UPSTREAM_RENDERER_REPO, ref `main` when the client build
|
||||
# context is `main`, otherwise `Dev`.
|
||||
#
|
||||
# The two repos must stay wire-aligned (composer/parser
|
||||
# signatures); pairing `main` with a stale branch is what
|
||||
# signatures); pairing the client with a stale renderer is what
|
||||
# produced the "Expected 14-15 arguments, but got 16" failure on
|
||||
# the catalog edit composer.
|
||||
#
|
||||
# This branch (`feat/housekeeping-panel`) references HK composers
|
||||
# /events that live on the renderer PR branch
|
||||
# (simoleo89/Nitro_Render_V3 @ feat/housekeeping-packets) — they
|
||||
# haven't been merged upstream yet. Pair against the fork branch
|
||||
# for this PR so the typecheck step can resolve the imports;
|
||||
# once the renderer PR lands on duckietm:Dev this whole
|
||||
# special-case block can be dropped.
|
||||
#
|
||||
# Mapping:
|
||||
# client `main` → duckietm/Nitro_Render_V3 @ main
|
||||
# client `feat/housekeeping-panel` → simoleo89/Nitro_Render_V3 @ feat/housekeeping-packets
|
||||
# client `feat/**` (other) → duckietm/Nitro_Render_V3 @ Dev
|
||||
# PR base `main` → duckietm/Nitro_Render_V3 @ main
|
||||
# PR head `feat/housekeeping-panel` → simoleo89/Nitro_Render_V3 @ feat/housekeeping-packets
|
||||
# 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.
|
||||
# the catalog edit composer. When a feature touches both repos,
|
||||
# point RENDERER_REPO/RENDERER_REF (or the dispatch inputs) at the
|
||||
# companion renderer branch.
|
||||
- name: Resolve renderer ref
|
||||
id: renderer
|
||||
env:
|
||||
IN_REPO: ${{ github.event.inputs.renderer_repo }}
|
||||
IN_REF: ${{ github.event.inputs.renderer_ref }}
|
||||
VAR_REPO: ${{ vars.RENDERER_REPO }}
|
||||
VAR_REF: ${{ vars.RENDERER_REF }}
|
||||
run: |
|
||||
REPO="${{ github.event.inputs.renderer_repo }}"
|
||||
REF="${{ github.event.inputs.renderer_ref }}"
|
||||
@@ -93,6 +98,13 @@ jobs:
|
||||
AUTO_REPO="duckietm/Nitro_Render_V3"
|
||||
AUTO_REF="main"
|
||||
;;
|
||||
Dev)
|
||||
# The client `Dev` branch carries the custom features
|
||||
# (rare values, fortune wheel, soundboard); they live on
|
||||
# the matching renderer fork branch, not upstream.
|
||||
AUTO_REPO="medievalshell/Nitro_Render_V3"
|
||||
AUTO_REF="dev"
|
||||
;;
|
||||
feat/housekeeping-panel)
|
||||
AUTO_REPO="simoleo89/Nitro_Render_V3"
|
||||
AUTO_REF="feat/housekeeping-packets"
|
||||
@@ -107,9 +119,18 @@ jobs:
|
||||
[ -z "$REF" ] && REF="$AUTO_REF"
|
||||
fi
|
||||
|
||||
# Precedence: dispatch input → repo variable → upstream default.
|
||||
REPO="$IN_REPO"
|
||||
[ -z "$REPO" ] && REPO="$VAR_REPO"
|
||||
[ -z "$REPO" ] && REPO="$UPSTREAM_RENDERER_REPO"
|
||||
|
||||
REF="$IN_REF"
|
||||
[ -z "$REF" ] && REF="$VAR_REF"
|
||||
[ -z "$REF" ] && REF="$DEFAULT_REF"
|
||||
|
||||
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})"
|
||||
echo "Resolved renderer pairing: $REPO @ $REF (client ctx: $CTX, event: ${GITHUB_EVENT_NAME})"
|
||||
|
||||
- name: Checkout Nitro_Render_V3 (sibling)
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user