summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/check-whitespace.yml8
1 files changed, 5 insertions, 3 deletions
diff --git a/.github/workflows/check-whitespace.yml b/.github/workflows/check-whitespace.yml
index 9d070b9cdf..f1483059c7 100644
--- a/.github/workflows/check-whitespace.yml
+++ b/.github/workflows/check-whitespace.yml
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Set commit count
shell: bash
- run: echo "::set-env name=COMMIT_DEPTH::$((1+$COMMITS))"
+ run: echo "COMMIT_DEPTH=$((1+$COMMITS))" >>$GITHUB_ENV
env:
COMMITS: ${{ github.event.pull_request.commits }}
@@ -58,12 +58,14 @@ jobs:
- name: Add Check Output as Comment
uses: actions/github-script@v3
id: add-comment
+ env:
+ log: ${{ steps.check_out.outputs.checkout }}
with:
script: |
- github.issues.createComment({
+ await github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
- body: "Whitespace errors found in workflow ${{ github.workflow }}:\n\n${{ steps.check_out.outputs.checkout }}"
+ body: `Whitespace errors found in workflow ${{ github.workflow }}:\n\n\`\`\`\n${process.env.log.replace(/\\n/g, "\n")}\n\`\`\``
})
if: ${{ failure() }}