Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/hardware.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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'
- '.github/workflows/hardware.yml'

workflow_dispatch:
inputs:
pr_number:
description: 'PR Number to test (e.g. 15)'
required: true
type: string

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})`
});
Loading