Skip to content

Commit

Permalink
tee output to console (#6)
Browse files Browse the repository at this point in the history
This should hopefully help in debugging. `$GITHUB_STEP_SUMMARY` is an
"environment file" provided by GitHub Actions, so we can treat it just
like a file and use `tee` to append data to it.

Based on an idea by @oscargus raised in #4.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#adding-a-job-summary
https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#environment-files
  • Loading branch information
nickcharlton authored Aug 16, 2024
1 parent 48caa85 commit 2805447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
- run: ${{ inputs.command }}
shell: bash

- run: $GITHUB_ACTION_PATH/bin/diff-check >> $GITHUB_STEP_SUMMARY
- run: $GITHUB_ACTION_PATH/bin/diff-check | tee -a $GITHUB_STEP_SUMMARY
shell: bash
env:
GITHUB_ACTION_PATH: ${{ github.action_path }}

0 comments on commit 2805447

Please sign in to comment.