@@ -178,13 +178,11 @@ jobs:
178178 path : bloat-data/
179179 retention-days : 1
180180
181- # Assemble bloat report from matrix artifacts and post as PR comment
181+ # Assemble bloat report from matrix artifacts and save for the comment workflow
182182 bloat-report :
183183 if : github.event_name == 'pull_request'
184184 needs : build
185185 runs-on : ubuntu-latest
186- permissions :
187- pull-requests : write
188186 steps :
189187 - uses : actions/checkout@v6
190188 - uses : actions/download-artifact@v7
@@ -193,41 +191,17 @@ jobs:
193191 pattern : bloat-*
194192 merge-multiple : true
195193 - name : Generate report
196- id : report
197194 run : |
198195 report=$(.github/ci/bloat-report.sh bloat-artifacts)
199- # Save for the comment step (handle multi-line)
200- echo "REPORT<<EOF" >> "$GITHUB_ENV"
201- echo "$report" >> "$GITHUB_ENV"
202- echo "EOF" >> "$GITHUB_ENV"
203- - name : Post PR comment
204- uses : actions/github-script@v7
196+ mkdir -p bloat-comment
197+ echo "${{ github.event.pull_request.number }}" > bloat-comment/pr-number.txt
198+ echo "$report" > bloat-comment/report.md
199+ - name : Upload comment data
200+ uses : actions/upload-artifact@v7
205201 with :
206- github-token : ${{ secrets.GITHUB_TOKEN }}
207- script : |
208- const marker = '## Size Report';
209- const body = process.env.REPORT;
210- const { data: comments } = await github.rest.issues.listComments({
211- issue_number: context.issue.number,
212- owner: context.repo.owner,
213- repo: context.repo.repo,
214- });
215- const existing = comments.find(c => c.body.includes(marker));
216- if (existing) {
217- await github.rest.issues.updateComment({
218- comment_id: existing.id,
219- owner: context.repo.owner,
220- repo: context.repo.repo,
221- body,
222- });
223- } else {
224- await github.rest.issues.createComment({
225- issue_number: context.issue.number,
226- owner: context.repo.owner,
227- repo: context.repo.repo,
228- body,
229- });
230- }
202+ name : bloat-comment
203+ path : bloat-comment/
204+ retention-days : 1
231205
232206 # Build ESP/xtensa examples (separate toolchain)
233207 build-esp :
0 commit comments