fix: apply -warnaserror reliably

act_runner mangles boolean input defaults: format('{0}', inputs.warnaserror)
evaluated to '%!t(string=false)', so -warnaserror was never passed.
Input is now a string defaulting to "true"; anything but "false" enables it.
Build command is traced (set -x) so the log shows the flags used.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
UltimateCoderandClaude Opus 5.5 committed 2026-10-15 22:30:46 +02:00
1 parent cdd0db3c65
commit abae212813
3 files changed
+13 -9

No files matched your search

@@ -18,11 +18,12 @@ on:
required: false
default: "Release"
type: string
# string, not boolean: act_runner mangles boolean defaults (format() yields '%!t(string=false)').
warnaserror:
description: "Treat build warnings as errors"
description: "Treat build warnings as errors (\"true\"/\"false\")"
required: false
default: true
type: boolean
default: "true"
type: string
working-directory:
description: "Path where dotnet commands are executed (relative to repo root)"
required: false
@@ -100,9 +101,10 @@ jobs:
- name: Build
run: |
ARGS=(-c "$CONFIGURATION" --no-restore)
if [ "$WARNASERROR" = "true" ]; then
if [ "${WARNASERROR,,}" != "false" ]; then
ARGS+=(-warnaserror)
fi
set -x
dotnet build ${SOLUTION:+"$SOLUTION"} "${ARGS[@]}"
# The image's init phase listens on the unix socket only, so an open TCP port means the final server is up.