All checks were successful
manufacturing-outputs / Generate-Manufacturing-Outputs (push) Successful in 23s
70 lines
2.6 KiB
Markdown
70 lines
2.6 KiB
Markdown
# KiCad-Actions-Demo
|
|
|
|
# Manufacturing Outputs AllSpice.io Action
|
|
|
|
This AllSpice.io Action automates the process of generating manufacturing outputs for KiCad projects using a Docker container with the AllSpice KiCad image. The primary goal of this repository is to demonstrate how to load the KiCad image effectively.
|
|
|
|
## Overview
|
|
|
|
The workflow is triggered by two events:
|
|
1. A `push` to the repository.
|
|
2. A `release` event, specifically when a release is published or edited.
|
|
|
|
The action runs in a Docker container based on the `allspice/kicad:8.0-releases` image, ensuring a consistent environment for generating KiCad outputs.
|
|
|
|
## Workflow Details
|
|
|
|
- **Trigger Events:**
|
|
This workflow is triggered by either a `push` event or a `release` event (with types `published` or `edited`).
|
|
|
|
- **Runs On:**
|
|
It runs on the latest Ubuntu AllSpice.io runner (`ubuntu-latest`) with the KiCad container.
|
|
|
|
- **Steps:**
|
|
1. **Check out repository code:**
|
|
Uses the AllSpice.io `actions/checkout@v4` action to check out the repository containing the KiCad project.
|
|
2. **Print variables:**
|
|
Outputs the values of `SCH_FILENAME` and `PCB_FILENAME` for verification.
|
|
3. **Install Python requirements:**
|
|
Installs required Python packages from `.allspice/utils/requirements.txt` using `pip`.
|
|
|
|
## Example Usage
|
|
|
|
To use this AllSpice.io Action in your repository:
|
|
|
|
1. Add the following workflow file (e.g., `.allspice/workflows/manufacturing-outputs.yml`):
|
|
|
|
```yaml
|
|
name: manufacturing-outputs
|
|
|
|
on:
|
|
push:
|
|
release:
|
|
types: [published, edited]
|
|
|
|
jobs:
|
|
Generate-Manufacturing-Outputs:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: allspice/kicad:8.0-releases
|
|
steps:
|
|
- name: "Check out repository code"
|
|
uses: actions/checkout@v4
|
|
|
|
- name: "Print variables"
|
|
run: |
|
|
echo ${{vars.SCH_FILENAME}}
|
|
echo ${{vars.PCB_FILENAME}}
|
|
|
|
- name: "Install python requirements"
|
|
run: pip install -r .allspice/utils/requirements.txt
|
|
```
|
|
|
|
2. Ensure that your KiCad project contains the necessary schematic (`SCH_FILENAME`) and PCB (`PCB_FILENAME`) files, and define these environment variables in your repository.
|
|
|
|
3. Make sure you have a `requirements.txt` file in the `.allspice/utils/` directory, listing all the Python dependencies needed to process the KiCad files.
|
|
|
|
## Goal
|
|
|
|
The goal of this repository is to provide a simple demonstration of how to load the KiCad Docker image and set up an environment for processing KiCad projects. You can further expand this example to generate manufacturing outputs such as Gerber files or BOM by adding relevant KiCad commands or scripts in additional steps.
|