Skip to content

Commit e8bb014

Browse files
committed
fix: resolve all YAML syntax errors in workflows
- Fixed integrate-develop.yml: Replace heredoc with echo commands to avoid YAML parsing conflicts - Fixed update-version.yml: Replace heredoc blocks with echo commands - All workflows now pass GitHub Actions YAML validation - Verified with yaml-validator and GitHub CLI This should stop the workflow error notification emails.
1 parent 9b5fb63 commit e8bb014

File tree

2 files changed

+56
-72
lines changed

2 files changed

+56
-72
lines changed

.github/workflows/integrate-develop.yml

Lines changed: 28 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -78,37 +78,31 @@ jobs:
7878
COMMIT_COUNT="${{ steps.commit-info.outputs.commit_count }}"
7979
TIMESTAMP="${{ steps.commit-info.outputs.timestamp }}"
8080
81-
# Write PR body
82-
cat > pr-body.md << EOF
83-
## 🚀 Integration from develop to staging
84-
85-
### 📊 Summary
86-
- **Commits**: ${COMMIT_COUNT} new commits
87-
- **Created**: ${TIMESTAMP}
88-
- **Auto-generated**: This PR was automatically created by the integration workflow
89-
90-
### 📝 Recent Commits
91-
EOF
92-
93-
# Append commits safely
94-
echo "${{ steps.commit-info.outputs.commits }}" >> pr-body.md
95-
96-
# Append rest of PR body
97-
cat >> pr-body.md << 'EOF'
98-
99-
### 🔍 What happens next?
100-
1. Review the changes in this PR
101-
2. Run any necessary QA tests
102-
3. When approved and merged, the staging workflow will:
103-
- Check for changesets
104-
- If found, create beta releases
105-
- Automatically create a PR to main
106-
107-
### ⚡ Notes
108-
- This PR will be automatically updated with new commits to develop
109-
- Multiple features can accumulate in this single PR
110-
- Approval triggers the beta release process
111-
EOF
81+
# Create PR body file
82+
{
83+
echo "## 🚀 Integration from develop to staging"
84+
echo ""
85+
echo "### 📊 Summary"
86+
echo "- **Commits**: ${COMMIT_COUNT} new commits"
87+
echo "- **Created**: ${TIMESTAMP}"
88+
echo "- **Auto-generated**: This PR was automatically created by the integration workflow"
89+
echo ""
90+
echo "### 📝 Recent Commits"
91+
echo "${{ steps.commit-info.outputs.commits }}"
92+
echo ""
93+
echo "### 🔍 What happens next?"
94+
echo "1. Review the changes in this PR"
95+
echo "2. Run any necessary QA tests"
96+
echo "3. When approved and merged, the staging workflow will:"
97+
echo " - Check for changesets"
98+
echo " - If found, create beta releases"
99+
echo " - Automatically create a PR to main"
100+
echo ""
101+
echo "### ⚡ Notes"
102+
echo "- This PR will be automatically updated with new commits to develop"
103+
echo "- Multiple features can accumulate in this single PR"
104+
echo "- Approval triggers the beta release process"
105+
} > pr-body.md
112106
113107
gh pr create \
114108
--base staging \
@@ -136,26 +130,16 @@ EOF
136130
CURRENT_BODY=$(gh pr view $PR_NUMBER --json body --jq '.body')
137131
138132
# Create updated section
139-
UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}
140-
**New commits**: ${COMMIT_COUNT}
141-
142-
### 📝 Recent Commits
143-
$COMMITS"
133+
UPDATED_SECTION="### 🔄 Last Updated: ${TIMESTAMP}\nNew commits: ${COMMIT_COUNT}\n\n### 📝 Recent Commits\n${COMMITS}"
144134
145135
# Update or append the updated section
146136
if echo "$CURRENT_BODY" | grep -q "### 🔄 Last Updated:"; then
147137
# Replace existing update section
148138
NEW_BODY=$(echo "$CURRENT_BODY" | sed '/### 🔄 Last Updated:/,/### 📝 Recent Commits/d' | sed '/^$/d')
149-
NEW_BODY="$NEW_BODY
150-
151-
$UPDATED_SECTION"
139+
NEW_BODY="$NEW_BODY\n\n$UPDATED_SECTION"
152140
else
153141
# Append update section
154-
NEW_BODY="$CURRENT_BODY
155-
156-
---
157-
158-
$UPDATED_SECTION"
142+
NEW_BODY="$CURRENT_BODY\n\n---\n\n$UPDATED_SECTION"
159143
fi
160144
161145
# Update PR body

.github/workflows/update-version.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,20 @@ jobs:
154154
# Create PR
155155
VERSION="${{ steps.version-update.outputs.version }}"
156156
157-
cat > pr-body.md << EOF
158-
## 🔄 Version Sync from Main
159-
160-
### 📦 Updated Versions
161-
This PR syncs the stable version updates from main to develop.
162-
163-
Version: **v$VERSION**
164-
165-
### ⚡ Auto-merge
166-
This PR should be merged automatically to keep branches in sync.
167-
168-
---
169-
*This PR was automatically created by the version update workflow*
170-
EOF
157+
{
158+
echo "## 🔄 Version Sync from Main"
159+
echo ""
160+
echo "### 📦 Updated Versions"
161+
echo "This PR syncs the stable version updates from main to develop."
162+
echo ""
163+
echo "Version: **v$VERSION**"
164+
echo ""
165+
echo "### ⚡ Auto-merge"
166+
echo "This PR should be merged automatically to keep branches in sync."
167+
echo ""
168+
echo "---"
169+
echo "*This PR was automatically created by the version update workflow*"
170+
} > pr-body.md
171171
172172
gh pr create \
173173
--base develop \
@@ -202,20 +202,20 @@ EOF
202202
# Create PR
203203
VERSION="${{ steps.version-update.outputs.version }}"
204204
205-
cat > pr-body-staging.md << EOF
206-
## 🔄 Version Sync from Main
207-
208-
### 📦 Updated Versions
209-
This PR syncs the stable version updates from main to staging.
210-
211-
Version: **v$VERSION**
212-
213-
### ⚡ Auto-merge
214-
This PR should be merged automatically to keep branches in sync.
215-
216-
---
217-
*This PR was automatically created by the version update workflow*
218-
EOF
205+
{
206+
echo "## 🔄 Version Sync from Main"
207+
echo ""
208+
echo "### 📦 Updated Versions"
209+
echo "This PR syncs the stable version updates from main to staging."
210+
echo ""
211+
echo "Version: **v$VERSION**"
212+
echo ""
213+
echo "### ⚡ Auto-merge"
214+
echo "This PR should be merged automatically to keep branches in sync."
215+
echo ""
216+
echo "---"
217+
echo "*This PR was automatically created by the version update workflow*"
218+
} > pr-body-staging.md
219219
220220
gh pr create \
221221
--base staging \

0 commit comments

Comments
 (0)