templates: boolean inputs are not passed reliably through workflow_call with: — switch toggles to string form (mount-docker-socket / verify-sha)

This commit is contained in:
2026-08-27 12:51:10 +08:00
parent 7d8d9d8a2a
commit 1be2f0f072
2 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -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}"
+4 -4
View File
@@ -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=""