Skip to content

Commit 02fb64c

Browse files
committed
fix(ci): avoid shell interpolation in promotion PR body
1 parent 21d31c7 commit 02fb64c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/promote-next-to-main.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,15 @@ jobs:
114114
- name: Upsert promotion PR
115115
env:
116116
GH_TOKEN: ${{ steps.app-token.outputs.token }}
117+
PROMOTION_PR_TITLE: ${{ steps.meta.outputs.title }}
118+
PROMOTION_PR_BODY: ${{ steps.meta.outputs.body }}
117119
shell: bash
118120
run: |
119121
set -euo pipefail
120122
123+
body_file=$(mktemp)
124+
printf '%s\n' "$PROMOTION_PR_BODY" > "$body_file"
125+
121126
existing=$(gh pr list \
122127
--state open \
123128
--base main \
@@ -127,14 +132,14 @@ jobs:
127132
128133
if [ -n "$existing" ]; then
129134
gh pr edit "$existing" \
130-
--title "${{ steps.meta.outputs.title }}" \
131-
--body "${{ steps.meta.outputs.body }}"
135+
--title "$PROMOTION_PR_TITLE" \
136+
--body-file "$body_file"
132137
echo "Updated PR #$existing"
133138
else
134139
gh pr create \
135140
--base main \
136141
--head next \
137-
--title "${{ steps.meta.outputs.title }}" \
138-
--body "${{ steps.meta.outputs.body }}"
142+
--title "$PROMOTION_PR_TITLE" \
143+
--body-file "$body_file"
139144
echo "Created promotion PR"
140145
fi

0 commit comments

Comments
 (0)