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 724224e commit f88d5e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/upgrade-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ jobs:
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Install
run: yarn install
- name: Get the output from yarn outdated and save it in a variable to reference in the PR body
- name: Run yarn outdated
run: yarn outdated > outdated.txt
- name: Save the output from yarn outdated 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
# See also https://github.com/github/docs/issues/21529 for more info on why this is not quite so simple
run: |
yarn outdated > outdated.txt
YARN_OUTDATED=$(cat outdated.txt)
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "outdated<<$EOF" >> "$GITHUB_OUTPUT"
echo "$YARN_OUTDATED" >> "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
rm outdated.txt
- name: Remove temporary file
run: rm outdated.txt
- name: Do the upgrade
run: yarn upgrade
- name: Create Pull Request
Expand Down
19 changes: 0 additions & 19 deletions outdated.txt

This file was deleted.

0 comments on commit f88d5e7

Please sign in to comment.