From 1be2f0f07278e9b425f709a22851b254adafebd8 Mon Sep 17 00:00:00 2001 From: zcode_mulm Date: Thu, 27 Aug 2026 12:51:10 +0800 Subject: [PATCH] =?UTF-8?q?templates:=20boolean=20inputs=20are=20not=20pas?= =?UTF-8?q?sed=20reliably=20through=20workflow=5Fcall=20with:=20=E2=80=94?= =?UTF-8?q?=20switch=20toggles=20to=20string=20form=20(mount-docker-socket?= =?UTF-8?q?=20/=20verify-sha)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/reusable/checkout.yml | 8 ++++---- .gitea/workflows/reusable/node-quality.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/reusable/checkout.yml b/.gitea/workflows/reusable/checkout.yml index a85154f..aca5575 100644 --- a/.gitea/workflows/reusable/checkout.yml +++ b/.gitea/workflows/reusable/checkout.yml @@ -16,9 +16,9 @@ on: default: 1 verify-sha: required: false - type: boolean - default: true - description: "Fail unless the checked-out HEAD equals the triggering commit" + type: string + default: "yes" + description: "Empty disables; otherwise fail unless HEAD equals the triggering commit (boolean inputs are NOT reliable through workflow_call with:)" jobs: checkout: @@ -32,7 +32,7 @@ jobs: fetch-depth: ${{ inputs.fetch-depth }} - name: verify HEAD equals triggering commit - if: inputs.verify-sha + if: inputs.verify-sha != '' run: | set -eu test "$(git rev-parse HEAD)" = "${GITHUB_SHA}" diff --git a/.gitea/workflows/reusable/node-quality.yml b/.gitea/workflows/reusable/node-quality.yml index 574c532..3ae90fc 100644 --- a/.gitea/workflows/reusable/node-quality.yml +++ b/.gitea/workflows/reusable/node-quality.yml @@ -52,9 +52,9 @@ on: description: "fixed: one shared persistent dir. per-run: fresh mktemp child per run + always() cleanup (for scripts with from-zero guards on commit-keyed tool caches)" mount-docker-socket: required: false - type: boolean - default: false - description: "Mount /var/run/docker.sock into the toolchain containers (install scripts that pull images)" + type: string + default: "" + description: "Non-empty (e.g. 'yes') mounts /var/run/docker.sock into the toolchain containers (boolean inputs are NOT passed reliably through workflow_call with:)" commit-env-name: required: false type: string @@ -122,7 +122,7 @@ jobs: run: | set -eu mount_args="" - if [ "${{ inputs.mount-docker-socket }}" = "true" ]; then + if [ -n "${{ inputs.mount-docker-socket }}" ]; then mount_args="-v /var/run/docker.sock:/var/run/docker.sock" fi env_args=""