Skip to content

Commit 3a9d4ad

Browse files
committed
write PR body to file, read back in later
1 parent 751b867 commit 3a9d4ad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/build-and-stage.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ jobs:
3535

3636
- name: Detect template source from PR body
3737
run: |
38-
PullRequestBody=$(cat <<'EOF'
38+
cat << EOF > /tmp/pull_request_body.txt
3939
${{ github.event.pull_request.body }}
4040
EOF
41-
)
42-
CheckoutTarget=$(grep "template_checkout_target=" $PullRequestBody | awk '{print $2}')
43-
if [[ $CheckoutTarget ]]; then
41+
42+
CheckoutTarget=$(grep "template_checkout_target=" /tmp/pull_request_body.txt | awk -F= '{print $2}')
43+
if [ "$CheckoutTarget" = "" ]; then
44+
echo "Did not find a checkout target for templates."
45+
else
4446
echo "Found checkout target '$CheckoutTarget' in PR body, using include templates from source."
4547
echo "{TEMPLATE_CHECKOUT_TARGET}=$CheckoutTarget" >> "$GITHUB_ENV"
46-
else
47-
echo "Did not find a checkout target for templates."
4848
fi
4949
5050
# - name: Login to Azure

0 commit comments

Comments
 (0)