Skip to content

Bundle size | Comment on PR #449

Bundle size | Comment on PR

Bundle size | Comment on PR #449

name: Bundle size | Comment on PR
on:
workflow_run:
workflows: ['Bundle size']
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' && contains(fromJSON('["success", "failure"]'), github.event.workflow_run.conclusion) }}
permissions:
pull-requests: write
actions: read
contents: read
steps:
- name: Download artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4
with:
name: monosize-report
path: ./results
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Load PR number
id: pr_number
run: echo "id=$(cat pr.txt)" >> $GITHUB_OUTPUT
working-directory: ./results
- name: 'Comment on PR'
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v2
with:
header: bundle-size-report
number: ${{ steps.pr_number.outputs.id }}
path: ./results/monosize-report.md