diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index 46f945e19..384c2f3ce 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -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: |