fix: resolve YAML syntax errors in update-n8n-deps workflow
- Fixed multi-line commit message handling using proper heredoc syntax - Replaced direct variable expansion in YAML strings with proper shell substitution - Fixed GitHub output handling for PR body update summary - Ensured consistent indentation throughout the workflow The workflow was failing due to improper handling of multi-line strings with variable expansion in YAML. Now using heredoc with placeholder substitution for commit messages and proper GITHUB_OUTPUT syntax for passing data between steps.
This commit is contained in:
49
.github/workflows/update-n8n-deps.yml
vendored
49
.github/workflows/update-n8n-deps.yml
vendored
@@ -100,14 +100,31 @@ jobs:
|
||||
# Get update summary (file is written by the update script)
|
||||
UPDATE_SUMMARY=$(cat update-summary.txt 2>/dev/null || echo "Updated n8n dependencies")
|
||||
|
||||
# Commit changes
|
||||
git commit -m "chore: update n8n dependencies
|
||||
|
||||
$UPDATE_SUMMARY
|
||||
|
||||
🤖 Automated dependency update"
|
||||
# Create commit message using heredoc
|
||||
COMMIT_MSG=$(cat <<'COMMIT_EOF'
|
||||
chore: update n8n dependencies
|
||||
|
||||
${UPDATE_SUMMARY}
|
||||
|
||||
🤖 Automated dependency update
|
||||
COMMIT_EOF
|
||||
)
|
||||
# Replace placeholder with actual summary
|
||||
COMMIT_MSG="${COMMIT_MSG//\${UPDATE_SUMMARY}/$UPDATE_SUMMARY}"
|
||||
|
||||
git commit -m "$COMMIT_MSG"
|
||||
git push origin $BRANCH_NAME
|
||||
|
||||
# Save update summary as output for PR
|
||||
{
|
||||
echo 'UPDATE_SUMMARY<<EOF'
|
||||
if [ -f update-summary.txt ]; then
|
||||
cat update-summary.txt
|
||||
else
|
||||
echo "See commit for details"
|
||||
fi
|
||||
echo 'EOF'
|
||||
} >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create Pull Request
|
||||
if: steps.branch.outputs.branch_name != ''
|
||||
@@ -123,7 +140,7 @@ $UPDATE_SUMMARY
|
||||
|
||||
### 📦 Updates
|
||||
```
|
||||
$(cat update-summary.txt || echo "See commit for details")
|
||||
${{ steps.update.outputs.UPDATE_SUMMARY }}
|
||||
```
|
||||
|
||||
### ✅ Validation
|
||||
@@ -194,11 +211,19 @@ $UPDATE_SUMMARY
|
||||
# Get update summary
|
||||
UPDATE_SUMMARY=$(cat update-summary.txt || echo "Updated n8n dependencies")
|
||||
|
||||
git commit -m "chore: update n8n dependencies
|
||||
|
||||
$UPDATE_SUMMARY
|
||||
|
||||
🤖 Automated dependency update"
|
||||
# Create commit message using heredoc
|
||||
COMMIT_MSG=$(cat <<'COMMIT_EOF'
|
||||
chore: update n8n dependencies
|
||||
|
||||
${UPDATE_SUMMARY}
|
||||
|
||||
🤖 Automated dependency update
|
||||
COMMIT_EOF
|
||||
)
|
||||
# Replace placeholder with actual summary
|
||||
COMMIT_MSG="${COMMIT_MSG//\${UPDATE_SUMMARY}/$UPDATE_SUMMARY}"
|
||||
|
||||
git commit -m "$COMMIT_MSG"
|
||||
|
||||
git push
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user