forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 1013 Bytes
/
bundle-size-comment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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:
- name: Download artifact
uses: actions/download-artifact@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@v2
with:
header: bundle-size-report
number: ${{ steps.pr_number.outputs.id }}
path: ./results/monosize-report.md