Skip to content

Commit

Permalink
Fix multiline output in GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
krystof-k committed Mar 10, 2024
1 parent 044f53e commit 75f64cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/build-and-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ jobs:
run: yarn build
- name: Check for changes
id: check-for-changes
run: echo "diff=$( git diff )" >> $GITHUB_OUTPUT
run: |
{
echo "diff<<EOF"
git diff
echo "EOF"
} >> "$GITHUB_ENV"
check:
name: Check distribution file
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ jobs:
run: yarn build
- name: Check for changes
id: check-for-changes
run: echo "diff=$( git diff )" >> $GITHUB_OUTPUT
run: |
{
echo "diff<<EOF"
git diff
echo "EOF"
} >> "$GITHUB_ENV"
- if: ${{ steps.check-for-changes.outputs.diff != '' }}
name: Configure Git
run: |
Expand Down

0 comments on commit 75f64cb

Please sign in to comment.