fix(ci): bind release target context (#106836)

This commit is contained in:
Peter Steinberger
2026-07-13 15:00:03 -07:00
committed by GitHub
parent 3c58dba07b
commit 856e1ab8d9
2 changed files with 5 additions and 2 deletions

View File

@@ -764,6 +764,7 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
TARGET_REF: ${{ inputs.ref }}
TARGET_CONTEXT_REF: ${{ inputs.target_context_ref }}
TARGET_SHA: ${{ needs.resolve_target.outputs.sha }}
CHILD_WORKFLOW_REF: ${{ github.ref_name }}
PARENT_WORKFLOW_SHA: ${{ github.sha }}

View File

@@ -279,9 +279,10 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
const pluginPrereleaseScript = releaseWorkflow.jobs.plugin_prerelease.steps.find(
(step: WorkflowStep) => step.name === "Dispatch and monitor plugin prerelease",
).run;
const releaseChecksScript = releaseWorkflow.jobs.release_checks.steps.find(
const releaseChecksStep = releaseWorkflow.jobs.release_checks.steps.find(
(step: WorkflowStep) => step.name === "Dispatch and monitor release checks",
).run;
);
const releaseChecksScript = releaseChecksStep.run;
const buildDistStep = workflow.jobs["build-artifacts"].steps.find(
(step: WorkflowStep) => step.name === "Build dist",
);
@@ -425,6 +426,7 @@ describe("scripts/lib/plugin-prerelease-test-plan.mjs", () => {
expect(releaseChecksScript).toContain(
'release_checks_target_ref="${TARGET_CONTEXT_REF:-$TARGET_REF}"',
);
expect(releaseChecksStep.env?.TARGET_CONTEXT_REF).toBe("${{ inputs.target_context_ref }}");
expect(releaseChecksScript).toContain('-f ref="$release_checks_target_ref"');
expect(releaseWorkflowSource).toContain('--arg targetContextRef "$TARGET_CONTEXT_REF"');
expect(releaseWorkflowSource).toContain("targetContextRef: $targetContextRef");