Skip to content

Commit

Permalink
add workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
iabdalkader committed Jul 25, 2024
1 parent 005b6eb commit f235dac
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/code-size-report.yml
Original file line number Diff line number Diff line change
@@ -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 }}
18 changes: 18 additions & 0 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit f235dac

Please sign in to comment.