fix: resolve YAML syntax error in sync-public-docs workflow

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 <noreply@anthropic.com>
This commit is contained in:
TheFlow 2025-10-10 06:29:24 +13:00
parent e6b85d9fed
commit 1210237a44

View file

@ -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()