chore(bump-stacks): drop run_number input — informational, never read
This commit is contained in:
@@ -14,10 +14,6 @@ inputs:
|
||||
bot_token:
|
||||
description: PAT with write:repository on libretech/gitops-sandbox
|
||||
required: true
|
||||
run_number:
|
||||
description: optional Gitea Actions run_number (informational only)
|
||||
required: false
|
||||
default: "0"
|
||||
sandbox_repo:
|
||||
description: orchestrator repo slug
|
||||
required: false
|
||||
@@ -30,7 +26,6 @@ runs:
|
||||
env:
|
||||
STACK: ${{ inputs.stack }}
|
||||
SHA: ${{ inputs.sha }}
|
||||
RUN: ${{ inputs.run_number }}
|
||||
BOT_TOKEN: ${{ inputs.bot_token }}
|
||||
SANDBOX_REPO: ${{ inputs.sandbox_repo }}
|
||||
ACTION_PATH: ${{ github.action_path }}
|
||||
@@ -50,7 +45,7 @@ runs:
|
||||
bun install --silent
|
||||
|
||||
set +e
|
||||
bun "$ACTION_PATH/bump.js" "$STACK" "$SHA" "$RUN"
|
||||
bun "$ACTION_PATH/bump.js" "$STACK" "$SHA"
|
||||
rc=$?
|
||||
set -e
|
||||
if [ "$rc" = "10" ]; then
|
||||
@@ -60,7 +55,7 @@ runs:
|
||||
[ "$rc" = "0" ] || exit "$rc"
|
||||
|
||||
git add stacks.yml
|
||||
git commit -m "bump(${STACK}): sha=${SHA} run=${RUN}"
|
||||
git commit -m "bump(${STACK}): sha=${SHA}"
|
||||
if git push origin main; then
|
||||
echo "::notice::pushed bump for ${STACK} to ${SANDBOX_REPO}"
|
||||
exit 0
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
import { readFileSync, writeFileSync } from "node:fs";
|
||||
import { parseDocument } from "yaml";
|
||||
|
||||
const [, , stack, sha, run] = process.argv;
|
||||
const [, , stack, sha] = process.argv;
|
||||
if (!stack || !sha) {
|
||||
console.error("usage: bump.js <stack> <sha> <run>");
|
||||
console.error("usage: bump.js <stack> <sha>");
|
||||
process.exit(2);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,5 @@ if (String(oldSha) === String(sha)) {
|
||||
}
|
||||
|
||||
node.set("sha", sha);
|
||||
node.set("run", Number(run ?? 0));
|
||||
writeFileSync("stacks.yml", doc.toString());
|
||||
console.log(`bumped ${stack}: ${oldSha} → ${sha}`);
|
||||
|
||||
Reference in New Issue
Block a user