Skip to content

Commit

Permalink
ci: replace GITHUB_OUTPUT with GITHUB_ENV for multiline variables
Browse files Browse the repository at this point in the history
  • Loading branch information
cuyk committed Nov 2, 2022
1 parent fbe16d1 commit 19372f4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ jobs:
# The sed removes carriage returns so that the body is easier to parse later, and
# escapes backticks so that they are not executed as commands.
PR_BODY=$(printf '%s' "$PR" | jq '.[0].body' | sed 's/\\r//g' | sed 's/`/\\`/g')
echo pr_body=${PR_BODY} >> $GITHUB_OUTPUT
echo "pr_body<<EOF" >> $GITHUB_ENV
echo "$PR_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Extract Changelog
id: extract_changelog
shell: bash
run: |-
set -x
PR_BODY=${{ steps.fetch_pr_body.outputs.pr_body}}
PR_BODY=${{ env.pr_body}}
if [[ $PR_BODY = "null" ]]; then
echo "No PR body exists for this commit, so a release cannot be generated."
exit 1
Expand Down

0 comments on commit 19372f4

Please sign in to comment.