[test] split size report jobs (#11918)

This commit split the size report workflow into two jobs of different
permissions.
This commit is contained in:
Yakun Xu
2025-09-10 23:23:50 -07:00
committed by GitHub
parent ddbcaa6aee
commit 48835fd143
+24 -6
View File
@@ -42,9 +42,7 @@ concurrency:
jobs:
size-report:
permissions:
pull-requests: write
size-check:
runs-on: ubuntu-24.04
steps:
- name: Harden Runner
@@ -65,9 +63,29 @@ jobs:
run: |
./script/check-size
cat /tmp/ot-size-report/report_pr >> $GITHUB_STEP_SUMMARY
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
name: Post Report
if: ${{ github.event_name == 'pull_request_target' }}
- name: Upload report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: report_pr
path: /tmp/ot-size-report/report_pr
size-report:
needs:
- size-check
permissions:
pull-requests: write
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-24.04
steps:
- name: Download report
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: report_pr
path: /tmp/ot-size-report
- name: Post Report
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
id: post-report
with:
script: |