fix(ci): resolve YAML syntax error on line 168 in hotfix workflow
Replaced multiline YAML string with heredoc approach to avoid quoting issues.
This commit is contained in:
18
.github/workflows/hotfix-branch-creation.yml
vendored
18
.github/workflows/hotfix-branch-creation.yml
vendored
@@ -162,24 +162,32 @@ jobs:
|
||||
if [ -f "$CHANGELOG_PATH" ]; then
|
||||
DATE=$(date +%Y-%m-%d)
|
||||
|
||||
# Create hotfix entry
|
||||
HOTFIX_ENTRY="## [${HOTFIX_VERSION}] - ${DATE} - HOTFIX
|
||||
# Create hotfix entry using cat with heredoc
|
||||
cat > /tmp/hotfix_entry.md << 'EOF'
|
||||
## [${HOTFIX_VERSION}] - ${DATE} - HOTFIX
|
||||
|
||||
### Fixed
|
||||
- ${ISSUE}
|
||||
|
||||
---
|
||||
|
||||
"
|
||||
EOF
|
||||
|
||||
# Insert after the first line (title) using a temp file
|
||||
# Replace variables in the temp file
|
||||
sed -i.bak "s/\${HOTFIX_VERSION}/${HOTFIX_VERSION}/g" /tmp/hotfix_entry.md
|
||||
sed -i.bak "s/\${DATE}/${DATE}/g" /tmp/hotfix_entry.md
|
||||
sed -i.bak "s/\${ISSUE}/${ISSUE}/g" /tmp/hotfix_entry.md
|
||||
|
||||
# Insert after the first line (title)
|
||||
TITLE=$(head -n 1 "$CHANGELOG_PATH")
|
||||
BODY=$(tail -n +2 "$CHANGELOG_PATH")
|
||||
echo "$TITLE" > "$CHANGELOG_PATH"
|
||||
echo "" >> "$CHANGELOG_PATH"
|
||||
echo "$HOTFIX_ENTRY" >> "$CHANGELOG_PATH"
|
||||
cat /tmp/hotfix_entry.md >> "$CHANGELOG_PATH"
|
||||
echo "$BODY" >> "$CHANGELOG_PATH"
|
||||
|
||||
rm -f /tmp/hotfix_entry.md /tmp/hotfix_entry.md.bak
|
||||
|
||||
echo "✅ Added CHANGELOG entry for hotfix $HOTFIX_VERSION"
|
||||
else
|
||||
echo "⚠️ Warning: $CHANGELOG_PATH not found"
|
||||
|
||||
Reference in New Issue
Block a user