Rename root action inputs and outputs (#681)

This commit is contained in:
Bjorn Lu
2026-07-01 12:08:50 +00:00
committed by GitHub
parent f71ae043ed
commit 73591071e6
6 changed files with 66 additions and 32 deletions
+12 -3
View File
@@ -136,13 +136,22 @@ export function getRequiredInput(name: string) {
}
export function throwOnRenamedInputs(renames: Record<string, string>) {
const references: Record<string, string> = {};
for (const [oldInput, newInput] of Object.entries(renames)) {
if (core.getInput(oldInput)) {
throw new Error(
`The input "${oldInput}" has been renamed to "${newInput}". Please update your workflow file.`,
);
references[oldInput] = newInput;
}
}
if (Object.keys(references).length > 0) {
const list = Object.entries(references)
.map(([oldInput, newInput]) => `- "${oldInput}" -> "${newInput}"`)
.join("\n");
throw new Error(
`The following inputs have been renamed:\n${list}\nPlease update your workflow file.`,
);
}
}
function resolveChangesetsCli(cwd: string) {