diff --git a/.github/workflows/release-gate.yml b/.github/workflows/release-gate.yml index 2a20757..43c6ec5 100644 --- a/.github/workflows/release-gate.yml +++ b/.github/workflows/release-gate.yml @@ -190,12 +190,14 @@ jobs: id: results if: always() run: | - PASS=$(grep -c "PASS" /tmp/audit-checks.txt || echo "0") - WARN=$(grep -c "WARN" /tmp/audit-checks.txt || echo "0") - FAIL=$(grep -c "FAIL" /tmp/audit-checks.txt || echo "0") - echo "pass=$PASS" >> "$GITHUB_OUTPUT" - echo "warn=$WARN" >> "$GITHUB_OUTPUT" - echo "fail=$FAIL" >> "$GITHUB_OUTPUT" + # Strip ANSI codes before counting + CLEAN=$(sed 's/\x1b\[[0-9;]*m//g' /tmp/audit-checks.txt) + PASS=$(echo "$CLEAN" | grep -c "PASS" || true) + WARN=$(echo "$CLEAN" | grep -c "WARN" || true) + FAIL=$(echo "$CLEAN" | grep -c "FAIL" || true) + echo "pass=${PASS:-0}" >> "$GITHUB_OUTPUT" + echo "warn=${WARN:-0}" >> "$GITHUB_OUTPUT" + echo "fail=${FAIL:-0}" >> "$GITHUB_OUTPUT" - name: Upload audit results if: always() diff --git a/profiles/fastapi-vue/commands.sh b/profiles/fastapi-vue/commands.sh index 5ef3b7b..e992cc3 100755 --- a/profiles/fastapi-vue/commands.sh +++ b/profiles/fastapi-vue/commands.sh @@ -7,7 +7,7 @@ # Run from the repository root. # ============================================================================ -set -euo pipefail +set -uo pipefail RED='\033[0;31m' GREEN='\033[0;32m'