Report size deltas #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Report size deltas | |
| 'on': | |
| workflow_run: | |
| workflows: ["Compile Sketches"] | |
| types: [ completed ] | |
| permissions: {} | |
| jobs: | |
| report: | |
| # Only run when the triggering workflow was a pull_request build | |
| if: > | |
| github.event.workflow_run.conclusion == 'success' && | |
| github.event.workflow_run.pull_requests[0] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| actions: read | |
| pull-requests: write | |
| steps: | |
| - name: Check if PR exists | |
| run: | | |
| if [ "${{ github.event.workflow_run.pull_requests[0] }}" = "" ]; then | |
| echo "No PR detected — this was triggered by PUSH"; | |
| else | |
| echo "PR detected:"; | |
| echo "${{ toJson(github.event.workflow_run.pull_requests[0]) }}"; | |
| fi | |
| - name: Checkout repo | |
| uses: actions/checkout@v6 | |
| with: | |
| # If you rely on full history or special refs, include fetch-depth: 0 | |
| fetch-depth: 0 | |
| - name: Download report size data - action | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: report-size-data | |
| run-id: ${{ github.event.workflow_run.id }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path: report-size-data | |
| - name: Post report size deltas | |
| uses: arduino/report-size-deltas@v1 | |
| with: | |
| sketches-reports-source: report-size-data |