From 1210237a440bd962e62bb74f57bda46cd05da6d4 Mon Sep 17 00:00:00 2001 From: TheFlow Date: Fri, 10 Oct 2025 06:29:24 +1300 Subject: [PATCH] fix: resolve YAML syntax error in sync-public-docs workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix GitHub Actions workflow syntax error on line 127 (actually line 137). **Problem**: GitHub Actions expression with || operator inside echo command: echo "- Security Validation: ${{ steps.validation.outcome || 'skipped' }}" **Solution**: Move expression to shell variable with bash conditional: VALIDATION_STATUS="${{ steps.validation.outcome }}" if [ -z "$VALIDATION_STATUS" ]; then VALIDATION_STATUS="skipped" fi **Additional fixes**: - Add 2>/dev/null to git diff commands to suppress errors - Use standard bash syntax for conditional logic This resolves the workflow validation error preventing GitHub Actions from running. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/sync-public-docs.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync-public-docs.yml b/.github/workflows/sync-public-docs.yml index 80c5234a..8bd911b9 100644 --- a/.github/workflows/sync-public-docs.yml +++ b/.github/workflows/sync-public-docs.yml @@ -130,16 +130,22 @@ jobs: run: | cd tractatus-private + # Set validation status + VALIDATION_STATUS="${{ steps.validation.outcome }}" + if [ -z "$VALIDATION_STATUS" ]; then + VALIDATION_STATUS="skipped" + fi + # Generate sync report echo "# Sync Report - $(date -u +%Y-%m-%d)" > sync-report.md echo "" >> sync-report.md echo "## Validation Status" >> sync-report.md - echo "- Security Validation: ${{ steps.validation.outcome || 'skipped' }}" >> sync-report.md - echo "- Files Synced: $(cd ../tractatus-public && git diff --cached --name-only | wc -l)" >> sync-report.md + echo "- Security Validation: $VALIDATION_STATUS" >> sync-report.md + echo "- Files Synced: $(cd ../tractatus-public && git diff --cached --name-only 2>/dev/null | wc -l)" >> sync-report.md echo "" >> sync-report.md echo "## Changed Files" >> sync-report.md cd ../tractatus-public - git diff --cached --name-only >> ../tractatus-private/sync-report.md || echo "No changes" >> ../tractatus-private/sync-report.md + git diff --cached --name-only >> ../tractatus-private/sync-report.md 2>/dev/null || echo "No changes" >> ../tractatus-private/sync-report.md - name: Upload Sync Report if: always()