From 960770d73b2ec56d2ca7051f255e75d346fc33e4 Mon Sep 17 00:00:00 2001 From: Tobias Klemp Date: Fri, 2 Jan 2026 01:49:44 +0100 Subject: [PATCH] add debug --- .gitea/actions/deploy/action.yml | 48 ++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/.gitea/actions/deploy/action.yml b/.gitea/actions/deploy/action.yml index ead1b14..9bee5a4 100644 --- a/.gitea/actions/deploy/action.yml +++ b/.gitea/actions/deploy/action.yml @@ -46,10 +46,54 @@ runs: COMPOSE_PROJECT_NAME=${{ inputs.project_name }} EOF - - name: debug environment file + - name: Debug environment file shell: bash run: | - cat ${{ inputs.environment_file }} | echo $1 + echo "=== ENVIRONMENT FILE DEBUG ===" + echo "File path: ${{ inputs.environment_file }}" + echo "" + + # Check if file exists + if [ -f "${{ inputs.environment_file }}" ]; then + echo "✅ Environment file exists" + + # Show file size and permissions + ls -la "${{ inputs.environment_file }}" + echo "" + + # Show file contents + echo "📄 File contents:" + echo "---" + cat "${{ inputs.environment_file }}" + echo "---" + echo "" + + # Show line count + LINE_COUNT=$(wc -l < "${{ inputs.environment_file }}") + echo "📊 File has $LINE_COUNT lines" + + # Check for empty lines or whitespace issues + echo "🔍 Checking for issues:" + if grep -q "^$" "${{ inputs.environment_file }}"; then + echo "⚠️ File contains empty lines" + else + echo "✅ No empty lines found" + fi + + # Validate each variable is set + echo "🔧 Variable validation:" + while IFS='=' read -r key value; do + if [ -n "$key" ] && [ -n "$value" ]; then + echo " ✅ $key = $value" + elif [ -n "$key" ]; then + echo " ❌ $key is empty" + fi + done < "${{ inputs.environment_file }}" + + else + echo "❌ Environment file does not exist!" + fi + echo "==============================" - name: Create Docker context shell: bash