From 9229091777a565c8de7ce07836296332c5598338 Mon Sep 17 00:00:00 2001 From: FerretCode Date: Tue, 25 Nov 2025 21:55:12 -0800 Subject: [PATCH 1/2] add initial hardware visual diff pipeline revision --- .github/workflows/hardware.yml | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/hardware.yml diff --git a/.github/workflows/hardware.yml b/.github/workflows/hardware.yml new file mode 100644 index 0000000..42d27bf --- /dev/null +++ b/.github/workflows/hardware.yml @@ -0,0 +1,49 @@ +name: EPS Hardware Visual Diff + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: [opened, synchronize, reopened] + paths: + - 'eps/hardware/**.kicad_sch' + - 'eps/hardware/**.kicad_pcb' + - 'eps/hardware/**.kicad_pro' + +permissions: + contents: write + pull-requests: write + +jobs: + kiri-diff: + runs-on: ubuntu-latest + name: Kiri Schematic & PCB Diff + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Generate Interactive Diff + uses: usa-reddragon/kiri-github-action@v1 + with: + project-file: 'eps/hardware/eps.kicad_pro' + + - name: Post Diff Link + uses: actions/github-script@v7 + with: + script: | + const prNumber = context.issue.number; + const repo = context.repo.repo; + const owner = context.repo.owner; + const pageUrl = `https://${owner}.github.io/${repo}/pr-${prNumber}/`; + + github.rest.issues.createComment({ + owner, + repo, + issue_number: prNumber, + body: `⚡ **Hardware Interactive Diff:** [View Schematics & PCB](${pageUrl})` + }); From 1796c54fdaa3b822485986ed06afde5ef2d7bbfd Mon Sep 17 00:00:00 2001 From: FerretCode Date: Tue, 25 Nov 2025 22:15:29 -0800 Subject: [PATCH 2/2] add updated workflow --- .github/workflows/hardware.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hardware.yml b/.github/workflows/hardware.yml index 42d27bf..4ab2dce 100644 --- a/.github/workflows/hardware.yml +++ b/.github/workflows/hardware.yml @@ -11,6 +11,14 @@ on: - 'eps/hardware/**.kicad_sch' - 'eps/hardware/**.kicad_pcb' - 'eps/hardware/**.kicad_pro' + - '.github/workflows/hardware.yml' + + workflow_dispatch: + inputs: + pr_number: + description: 'PR Number to test (e.g. 15)' + required: true + type: string permissions: contents: write @@ -45,5 +53,5 @@ jobs: owner, repo, issue_number: prNumber, - body: `⚡ **Hardware Interactive Diff:** [View Schematics & PCB](${pageUrl})` + body: `**Hardware Interactive Diff:** [View Schematics & PCB](${pageUrl})` });