Skip to content

Commit

Permalink
Try action/github script
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Sep 11, 2023
1 parent 5c4b2dd commit 5d2f757
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/gas_reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ permissions:

jobs:
compare-snapshot:
permissions: write-all
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -35,10 +36,20 @@ jobs:
result="${result//$'\r'/'%0D'}"
echo "::set-output name=result::${result}"
- name: Comment on PR
uses: thollander/actions-comment-pull-request@v2
# - name: Comment on PR
# uses: thollander/actions-comment-pull-request@v2
# with:
# message: "Snapshot Comparison Report:\n\n${{
# steps.run-script.outputs.result }}" # Access the result output variable
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# comment_tag: gas-report

- uses: actions/github-script@v6
with:
message: "Snapshot Comparison Report:\n\n${{
steps.run-script.outputs.result }}" # Access the result output variable
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment_tag: gas-report
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Snapshot Comparison Report:\n\n${{steps.run-script.outputs.result }}"
})

0 comments on commit 5d2f757

Please sign in to comment.