Skip to content

Commit 191eee3

Browse files
committed
Fix YAML syntax error in config-sync-check workflow
Changed from quoted heredoc (<< 'EOFMARKER') to unquoted heredoc (<< EOFMARKER) to allow both bash variable expansion (${VAR}) and GitHub Actions expression evaluation (${{ }}). This matches the pattern used in cost-estimate.yml. The quoted heredoc was preventing GitHub Actions expressions from being evaluated, causing YAML syntax errors when the workflow tried to parse the unevaluated template syntax. Also simplified by removing unnecessary sed placeholder replacements, using direct variable substitution instead.
1 parent 12db466 commit 191eee3

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

.github/workflows/config-sync-check.yml

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,38 +85,26 @@ jobs:
8585
# Read the detailed output
8686
DETAILED_OUTPUT=$(cat /tmp/sync-check-output.txt)
8787
88-
# Escape special characters for markdown
89-
DETAILED_OUTPUT_ESCAPED=$(echo "$DETAILED_OUTPUT" | sed 's/\\/\\\\/g' | sed 's/`/\\`/g')
90-
91-
# Create markdown report
92-
cat > /tmp/sync-report.md << 'EOFMARKER'
88+
# Create markdown report using unquoted heredoc for variable expansion
89+
cat > /tmp/sync-report.md << EOFMARKER
9390
## 🔄 Configuration Sync Check
9491

95-
> **Analysis based on commit:** [`COMMIT_SHORT_PLACEHOLDER`](${{ github.event.pull_request.head.repo.html_url }}/commit/COMMIT_SHA_PLACEHOLDER)
96-
> **Generated at:** TIMESTAMP_PLACEHOLDER
92+
> **Analysis based on commit:** [\`${COMMIT_SHORT}\`](${{ github.event.pull_request.head.repo.html_url }}/commit/${COMMIT_SHA})
93+
> **Generated at:** ${TIMESTAMP}
9794

9895
### Summary
9996

100-
STATUS_PLACEHOLDER
97+
${STATUS}
10198

102-
SUMMARY_PLACEHOLDER
99+
${SUMMARY}
103100

104101
### Results
105102

106-
- **Warnings:** WARNINGS_PLACEHOLDER
107-
- **Errors:** ERRORS_PLACEHOLDER
103+
- **Warnings:** ${WARNINGS}
104+
- **Errors:** ${ERRORS}
108105

109106
EOFMARKER
110107

111-
# Replace placeholders
112-
sed -i "s|COMMIT_SHORT_PLACEHOLDER|$COMMIT_SHORT|g" /tmp/sync-report.md
113-
sed -i "s|COMMIT_SHA_PLACEHOLDER|$COMMIT_SHA|g" /tmp/sync-report.md
114-
sed -i "s|TIMESTAMP_PLACEHOLDER|$TIMESTAMP|g" /tmp/sync-report.md
115-
sed -i "s|STATUS_PLACEHOLDER|$STATUS|g" /tmp/sync-report.md
116-
sed -i "s|SUMMARY_PLACEHOLDER|$SUMMARY|g" /tmp/sync-report.md
117-
sed -i "s|WARNINGS_PLACEHOLDER|$WARNINGS|g" /tmp/sync-report.md
118-
sed -i "s|ERRORS_PLACEHOLDER|$ERRORS|g" /tmp/sync-report.md
119-
120108
# Add detailed findings if there are issues
121109
if [ "$ERRORS" -gt 0 ] || [ "$WARNINGS" -gt 0 ]; then
122110
cat >> /tmp/sync-report.md << 'EOF'

0 commit comments

Comments
 (0)