Skip to content

Commit 8d0cda1

Browse files
authored
Merge pull request #303 from LeeNX/ci-builds-leet
chore(ci): remove comment-on-pr, as it does not exist
2 parents 706a2b5 + 392ee53 commit 8d0cda1

File tree

2 files changed

+46
-7
lines changed

2 files changed

+46
-7
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838

3939
# See: https://github.com/arduino/compile-sketches#readme
4040
- name: Compile sketches
41+
id: compile
4142
uses: arduino/compile-sketches@v1
4243
with:
4344
enable-deltas-report: true
@@ -69,11 +70,8 @@ jobs:
6970
- name: Bounce2
7071
- source-path: .
7172
72-
- name: Sketches report size delta
73-
# Only run the action when the workflow is triggered by a pull request.
74-
if: github.event_name == 'pull_request'
75-
continue-on-error: true
76-
uses: arduino/report-size-deltas@v1
73+
- name: Upload report size data
74+
uses: actions/upload-artifact@v4
7775
with:
78-
github-token: ${{ secrets.GITHUB_TOKEN }}
79-
comment-on-pr: true
76+
name: report-size-data
77+
path: ${{ steps.compile.outputs.sizes-json-path }}

.github/workflows/report-size.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Report size deltas
3+
4+
'on':
5+
workflow_run:
6+
workflows: ["Compile Sketches"]
7+
types: [ completed ]
8+
9+
permissions: {}
10+
11+
jobs:
12+
report:
13+
# Only run when the triggering workflow was a pull_request build
14+
if: >
15+
github.event.workflow_run.event == 'pull_request' &&
16+
github.event.workflow_run.conclusion == 'success'
17+
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
pull-requests: write
22+
23+
steps:
24+
- name: Download size data
25+
uses: actions/download-artifact@v6
26+
with:
27+
name: report-size-data
28+
29+
- name: Checkout repo
30+
uses: actions/checkout@v6
31+
with:
32+
# If you rely on full history or special refs, include fetch-depth: 0
33+
fetch-depth: 0
34+
35+
- name: Post size deltas
36+
uses: arduino/report-size-deltas@v1
37+
with:
38+
base-sha: ${{ github.event.workflow_run.pull_requests[0].base.sha }}
39+
head-sha: ${{ github.event.workflow_run.pull_requests[0].head.sha }}
40+
sizes-json-path: sizes.json
41+
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)