fix: repair deploy pipeline — boolean type and unterminated quoted string
CI - Build & Test / Backend (.NET) (push) Successful in 26s
CI - Build & Test / Frontend (Vue/TS) (push) Successful in 16s
CI - Build & Test / Security Check (push) Successful in 3s

- Changed no_cache input type from boolean to string (Gitea 1.26.3 compat)
- Fixed multi-line double-quoted string in DEPLOYSCRIPT heredoc
- Hardened inputs.* references with proper short-circuit fallbacks
This commit is contained in:
2026-06-21 21:32:25 +02:00
parent ac131f7f53
commit ca4bad2ba7
+11 -14
View File
@@ -41,10 +41,10 @@ on:
default: ''
type: string
no_cache:
description: 'Disable Docker build cache'
description: 'Disable Docker build cache (true/false)'
required: false
default: false
type: boolean
default: 'false'
type: string
git_ref:
description: 'Git ref to deploy (branch, tag, or commit SHA; default: main)'
required: false
@@ -212,14 +212,15 @@ jobs:
set -euo pipefail
# Auto-deploy: always use cache. Manual: respect no_cache input.
NO_CACHE="${{ github.event_name == 'workflow_dispatch' && inputs.no_cache || false }}"
BUILD_ARGS=""
if [ "$NO_CACHE" = "true" ]; then
BUILD_ARGS="--no-cache"
SERVICE_ARG=""
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
if [ "${{ github.event_name == 'workflow_dispatch' && inputs.no_cache || 'false' }}" = "true" ]; then
BUILD_ARGS="--no-cache"
fi
SERVICE_ARG="${{ github.event_name == 'workflow_dispatch' && inputs.service || '' }}"
fi
SERVICE_ARG="${{ github.event_name == 'workflow_dispatch' && inputs.service || '' }}"
# Write the deploy script to a file to avoid nested quoting issues
cat > /tmp/nexus-deploy-script.sh << 'DEPLOYSCRIPT'
#!/bin/sh
@@ -235,13 +236,9 @@ docker rm -f nexus-postgres-1 nexus-api-1 nexus-web-1 2>/dev/null || true
PG_VOL=$(docker volume ls -q --filter name=nexus-postgres 2>/dev/null | head -1)
if [ -n "$PG_VOL" ]; then
echo "Checking postgres WAL integrity..."
docker run --rm -v "$PG_VOL:/var/lib/postgresql/data" \
--entrypoint sh postgres:17-alpine -c "
echo 'Resetting WAL...'
pg_resetwal -f /var/lib/postgresql/data && echo 'WAL reset OK'
" 2>&1 || echo 'pg_resetwal failed (may be benign)'
docker run --rm -v "$PG_VOL:/var/lib/postgresql/data" --entrypoint sh postgres:17-alpine -c "pg_resetwal -f /var/lib/postgresql/data && echo 'WAL reset OK'" 2>&1 || echo "pg_resetwal failed (may be benign)"
else
echo 'Postgres volume not found - will be created fresh'
echo "Postgres volume not found - will be created fresh"
fi
BUILD_ARGS="${DEPLOY_BUILD_ARGS:-}"