diff --git a/.github/workflows/code-size-report.yml b/.github/workflows/code-size-report.yml new file mode 100644 index 0000000..9f7705b --- /dev/null +++ b/.github/workflows/code-size-report.yml @@ -0,0 +1,32 @@ +name: Code Report + +on: + workflow_dispatch: + inputs: + pr_number: + description: 'The pull request number' + required: true + +permissions: + pull-requests: write + +jobs: + if: ${{ github.event.workflow_run.conclusion == 'success' }} + download-artifact: + runs-on: ubuntu-latest + steps: + - name: '📝 Generate report' + id: generate_report + run: | + CODE_SIZE_REPORT=code_size_report.md + echo "Test" > ${GITHUB_WORKSPACE}/${CODE_SIZE_REPORT} + if [ -s ${GITHUB_WORKSPACE}/${CODE_SIZE_REPORT} ]; then + echo "code_size_report=${CODE_SIZE_REPORT}" >> $GITHUB_OUTPUT + fi + + - name: '📝 Post report' + if: steps.generate_report.outputs.code_size_report != '' + uses: thollander/actions-comment-pull-request@v2 + with: + pr_number: ${{ github.event.pull_request.number }} + filePath: ${{ github.workspace }}/${{ steps.generate_report.outputs.code_size_report }} diff --git a/.github/workflows/firmware.yml b/.github/workflows/firmware.yml new file mode 100644 index 0000000..c4ce316 --- /dev/null +++ b/.github/workflows/firmware.yml @@ -0,0 +1,18 @@ +name: '🔥 Firmware Build' + +on: + pull_request: + types: [opened, synchronize] + +jobs: + code-size-report: + needs: build-firmware + runs-on: ubuntu-22.04 + steps: + - name: Trigger Code Size Report + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: code-size-report.yml + token: ${{ secrets.GITHUB_TOKEN }} + inputs: + pr_number: ${{ github.event.pull_request.number }}