Skip to content

Bundle size | Comment on PR #9918

Bundle size | Comment on PR

Bundle size | Comment on PR #9918

name: Bundle size | Comment on PR
on:
workflow_run:
workflows: ['Bundle size']
types:
- completed
jobs:
comment:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'microsoft' && github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }}
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v6
with:
sparse-checkout: |
.github
- name: Download artifact
uses: actions/download-artifact@v7
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
uses: actions/github-script@v8
with:
result-encoding: string
script: |
const run = require('./.github/scripts/validate-pr-number');
return run({ filePath: 'results/pr.txt' });
- name: 'Comment on PR'
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
with:
header: bundle-size-report
number: ${{ steps.pr_number.outputs.result }}
path: ./results/monosize-report.md