Daniel Lindmark f15596b5cf
All checks were successful
Component Check / Generate_BOM (push) Successful in 56s
Update report location
2025-06-01 22:03:12 -05:00

66 lines
2.3 KiB
YAML

# AllSpice Running common Actions workflow
# Action triggers on push and issues
# Action runs "generate-bom-altium" action
# .allspice/workflows/generate_bom.yml
name: Component Check
on:
push:
pull_request:
jobs:
Generate_BOM:
runs-on: ubuntu-latest
steps:
# Checkout is only needed if columns.json is committed in your Altium project repo.
- name: Checkout
uses: actions/checkout@v3
- name: Check out AllSpice Libraries
run: git clone https://hub.allspice.io/Actions/pretty-print .allspice/pretty-print
- name: Generate BOM
uses: https://hub.allspice.io/Actions/generate-bom@v0.5
with:
# The path to the project file in your repo (.PrjPcb for Altium, .DSN for OrCad).
source_path: design/BeagleY-AI_SCH_Rev A_240426.DSN
# [optional] A path to a YAML file mapping columns to the component attributes
# This file must be provided.
# Default: 'columns.json'
columns: .allspice/columns.yml
# [optional] The path to the output file that will be generated.
# Default: 'bom.csv'
output_file_name: bom.csv
# [optional] A comma-separated list of columns to group the BOM by. If empty
# or not present, the BOM will be flat.
# Default: ''
group_by: 'Part Number'
# Print bom.csv to terminal
- name: Show BOM 🔍
run: python3 .allspice/pretty-print/display_bom.py bom.csv
- name: Upload file as artifact
uses: actions/upload-artifact@v3
with:
name: BOM.csv
path: bom.csv
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# Note: if we add any other dependencies we should include a requirements.txt file
- run: pip install jinja2 py-allspice
- name: Check Components
run: .allspice/component_validation.py ./bom.csv
- name: Comment Results
run: >
.allspice/review_comment.py
--allspice_hub_url "${{ github.server_url }}"
--repository "${{ github.repository }}"
--review_number "${{ github.event.number }}"
--source_file ".allspice/report.md"
env:
ALLSPICE_AUTH_TOKEN: ${{ github.token }}