Skip to content

Post Gas Report Comment #195

Post Gas Report Comment

Post Gas Report Comment #195

name: Post Gas Report Comment
on:
workflow_run:
workflows: ["Gas Report"]
types:
- completed
permissions:
actions: read
pull-requests: write
issues: write
contents: read
jobs:
comment:
name: Post Gas Report Comment
runs-on: ubuntu-latest
# Only run if the workflow run was for a pull request
if: github.event.workflow_run.event == 'pull_request'
steps:
- name: Check workflow run status
run: |
echo "Workflow run conclusion: ${{ github.event.workflow_run.conclusion }}"
echo "Workflow run event: ${{ github.event.workflow_run.event }}"
echo "Workflow run ID: ${{ github.event.workflow_run.id }}"
echo "Head branch: ${{ github.event.workflow_run.head_branch }}"
- name: Checkout repository
if: github.event.workflow_run.conclusion == 'success'
uses: actions/checkout@v4
- name: Download and post gas report comment
if: github.event.workflow_run.conclusion == 'success'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const script = require('./.github/scripts/post-gas-comment.js');
await script({ github, context });