Skip to content

Commit c82bd03

Browse files
committed
fix(ci): fix yaml indentation and use echo for pr comment markdown
1 parent bed81e7 commit c82bd03

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,16 @@ jobs:
122122
echo "- **Target Worker**: \`codingcatdev-dev\`" >> $GITHUB_STEP_SUMMARY
123123
124124
if [ -n "$PREVIEW_URL" ]; then
125-
gh pr comment ${{ github.event.pull_request.number }} --body "### ⚡ Cloudflare Worker Preview Ready!
126-
127-
| Environment | URL |
128-
|---|---|
129-
| **PR Preview** | [${PREVIEW_URL}](${PREVIEW_URL}) |
130-
| **Dev Custom Domain** | [https://dev.codingcat.dev](https://dev.codingcat.dev) |
131-
132-
- **Worker Version ID**: \`${VERSION_ID}\`
133-
- **Protection**: Restricted to \`@codingcat.dev\` accounts via Cloudflare Zero Trust Access"
125+
echo "### ⚡ Cloudflare Worker Preview Ready!" > pr_comment.md
126+
echo "" >> pr_comment.md
127+
echo "| Environment | URL |" >> pr_comment.md
128+
echo "|---|---|" >> pr_comment.md
129+
echo "| **PR Preview** | [${PREVIEW_URL}](${PREVIEW_URL}) |" >> pr_comment.md
130+
echo "| **Dev Custom Domain** | [https://dev.codingcat.dev](https://dev.codingcat.dev) |" >> pr_comment.md
131+
echo "" >> pr_comment.md
132+
echo "- **Worker Version ID**: \`${VERSION_ID}\`" >> pr_comment.md
133+
echo "- **Protection**: Restricted to \`@codingcat.dev\` accounts via Cloudflare Zero Trust Access" >> pr_comment.md
134+
gh pr comment ${{ github.event.pull_request.number }} --body-file pr_comment.md
134135
fi
135136
env:
136137
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}

0 commit comments

Comments
 (0)