Skip to content

Commit 40bf55b

Browse files
authored
fix: remove deprecated commands and post comments from file (#10)
Update action steps * remove deprecated commands (https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/) * post comments from file (https://github.com/peter-evans/create-or-update-comment/releases/tag/v2.1.0)
1 parent 6caab62 commit 40bf55b

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

action.yml

+2-13
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,9 @@ runs:
5151
max_lock_duration: ${{ inputs.max_lock_duration }}
5252
max_duration: ${{ inputs.max_duration }}
5353

54-
- id: comment-body
55-
run: |
56-
body="$(cat report.md)"
57-
body="${body//'%'/'%25'}"
58-
body="${body//$'\n'/'%0A'}"
59-
body="${body//$'\r'/'%0D'}"
60-
echo "::set-output name=body::$body"
61-
shell: bash
62-
working-directory: artifacts
63-
if: ${{ always() }}
64-
6554
- name: Post comment to PR
6655
if: ${{ always() && github.event_name == 'pull_request' }}
67-
uses: peter-evans/create-or-update-comment@v2
56+
uses: peter-evans/create-or-update-comment@v2.1.0
6857
with:
6958
issue-number: ${{ github.event.pull_request.number }}
70-
body: ${{ steps.comment-body.outputs.body }}
59+
body-file: 'artifacts/report.md'

core/entrypoint.sh

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ if [[ $response_code -ne 200 ]]; then
4343
exit 1
4444
fi
4545

46-
echo "::set-output name=response::$(cat response.json)"
47-
4846
clone_id=$(jq -r '.clone_id' response.json)
4947
session_id=$(jq -r '.session.session_id' response.json)
5048

0 commit comments

Comments
 (0)