Skip to content

Commit

Permalink
chore: fix multiline string variable in workflow [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan committed Jul 2, 2024
1 parent a69c677 commit bebaf5b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/upgrade-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ jobs:
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install
run: yarn install
- name: Get the output from yarn outdated and save it in an environment variable
- name: Get the output from yarn outdated and save it in a variable to reference in the PR body
id: yarn
# See: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
run: |
{
echo 'YARN_OUTDATED<<EOF'
yarn outdated
echo EOF
} >> "$GITHUB_ENV"
- name: Take the env var from the previous step and save it in an output variable to reference in the PR body
id: yarn
run: echo "outdated=$YARN_OUTDATED" >> $GITHUB_OUTPUT
YARN_OUTDATED=$(yarn outdated)
echo "outdated=<<EOF" >> $GITHUB_OUTPUT
echo "$YARN_OUTDATED" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Do the upgrade
run: yarn upgrade
- name: Create Pull Request
Expand Down

0 comments on commit bebaf5b

Please sign in to comment.