Skip to content

Commit

Permalink
Handle PR bodies correctly (#11165)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryNguyen5 authored Nov 2, 2023
1 parent 8b6f489 commit 5cc88a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/operator-ui-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
url: ${{ secrets.AWS_INFRA_RELENG_TOKEN_ISSUER_LAMBDA_URL }}

- name: Open PR
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # v4.2.4
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
title: Update Operator UI from ${{ steps.update.outputs.current_tag }} to ${{ steps.update.outputs.latest_tag }}
token: ${{ steps.get-gh-token.outputs.access-token }}
Expand Down
15 changes: 8 additions & 7 deletions operator_ui/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ else
echo "$latest_tag" >"$tag_file"
echo "Tag updated $current_tag -> $latest_tag"
if [ "$CI" ]; then
echo "current_tag=$current_tag" >> $GITHUB_OUTPUT
echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
# See https://github.com/peter-evans/create-pull-request/blob/main/docs/examples.md#setting-the-pull-request-body-from-a-file
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "body=$body" >> $GITHUB_OUTPUT
echo "current_tag=$current_tag" >>$GITHUB_OUTPUT
echo "latest_tag=$latest_tag" >>$GITHUB_OUTPUT

# See https://github.com/orgs/community/discussions/26288#discussioncomment-3876281
delimiter="$(openssl rand -hex 8)"
echo "body<<${delimiter}" >>"${GITHUB_OUTPUT}"
echo "$body" >>"${GITHUB_OUTPUT}"
echo "${delimiter}" >>"${GITHUB_OUTPUT}"
fi
fi

0 comments on commit 5cc88a8

Please sign in to comment.