chore(bump-stacks): drop run_number input — informational, never read

This commit is contained in:
Michael Czechowski
2026-05-05 11:18:31 +02:00
parent 7c2ba75c36
commit fa35579609
2 changed files with 4 additions and 10 deletions

View File

@@ -14,10 +14,6 @@ inputs:
bot_token: bot_token:
description: PAT with write:repository on libretech/gitops-sandbox description: PAT with write:repository on libretech/gitops-sandbox
required: true required: true
run_number:
description: optional Gitea Actions run_number (informational only)
required: false
default: "0"
sandbox_repo: sandbox_repo:
description: orchestrator repo slug description: orchestrator repo slug
required: false required: false
@@ -30,7 +26,6 @@ runs:
env: env:
STACK: ${{ inputs.stack }} STACK: ${{ inputs.stack }}
SHA: ${{ inputs.sha }} SHA: ${{ inputs.sha }}
RUN: ${{ inputs.run_number }}
BOT_TOKEN: ${{ inputs.bot_token }} BOT_TOKEN: ${{ inputs.bot_token }}
SANDBOX_REPO: ${{ inputs.sandbox_repo }} SANDBOX_REPO: ${{ inputs.sandbox_repo }}
ACTION_PATH: ${{ github.action_path }} ACTION_PATH: ${{ github.action_path }}
@@ -50,7 +45,7 @@ runs:
bun install --silent bun install --silent
set +e set +e
bun "$ACTION_PATH/bump.js" "$STACK" "$SHA" "$RUN" bun "$ACTION_PATH/bump.js" "$STACK" "$SHA"
rc=$? rc=$?
set -e set -e
if [ "$rc" = "10" ]; then if [ "$rc" = "10" ]; then
@@ -60,7 +55,7 @@ runs:
[ "$rc" = "0" ] || exit "$rc" [ "$rc" = "0" ] || exit "$rc"
git add stacks.yml 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 if git push origin main; then
echo "::notice::pushed bump for ${STACK} to ${SANDBOX_REPO}" echo "::notice::pushed bump for ${STACK} to ${SANDBOX_REPO}"
exit 0 exit 0

View File

@@ -4,9 +4,9 @@
import { readFileSync, writeFileSync } from "node:fs"; import { readFileSync, writeFileSync } from "node:fs";
import { parseDocument } from "yaml"; import { parseDocument } from "yaml";
const [, , stack, sha, run] = process.argv; const [, , stack, sha] = process.argv;
if (!stack || !sha) { if (!stack || !sha) {
console.error("usage: bump.js <stack> <sha> <run>"); console.error("usage: bump.js <stack> <sha>");
process.exit(2); process.exit(2);
} }
@@ -25,6 +25,5 @@ if (String(oldSha) === String(sha)) {
} }
node.set("sha", sha); node.set("sha", sha);
node.set("run", Number(run ?? 0));
writeFileSync("stacks.yml", doc.toString()); writeFileSync("stacks.yml", doc.toString());
console.log(`bumped ${stack}: ${oldSha}${sha}`); console.log(`bumped ${stack}: ${oldSha}${sha}`);