mirror of
https://github.com/AllSpiceIO/generate-bom.git
synced 2025-03-22 16:04:33 +00:00
70 lines
2.0 KiB
YAML
70 lines
2.0 KiB
YAML
name: "Generate BOM"
|
|
description: >
|
|
Generate a BOM for the project using py-allspice and attach it as an artifact
|
|
to the run.
|
|
|
|
Works for Altium, OrCAD and System Capture projects.
|
|
|
|
inputs:
|
|
source_path:
|
|
description: >
|
|
Path to the source file from the root of the repo. This should be:
|
|
|
|
- A .PrjPcb file for Altium projects.
|
|
- A .DSN file for OrCAD projects.
|
|
- An .SDAX file for System Capture projects.
|
|
required: true
|
|
output_file_name:
|
|
description: "Name of the output file"
|
|
required: true
|
|
default: "bom.csv"
|
|
columns:
|
|
description: >
|
|
A path to a JSON file mapping columns to the attributes they are from.
|
|
required: true
|
|
group_by:
|
|
description: >
|
|
A comma-separated list of columns to group the BOM by. If not present, the
|
|
BOM will be flat.
|
|
default: ""
|
|
variant:
|
|
description: >
|
|
The variant of the project to generate the BOM for. If not present, the
|
|
BOM will be generated for the default variant. Not supported for OrCAD
|
|
projects.
|
|
default: ""
|
|
log_level:
|
|
description: >
|
|
The level at which to log. Use "DEBUG" to get more information, such as
|
|
about which file was used to match which device sheet.
|
|
required: false
|
|
default: INFO
|
|
auth_token:
|
|
description: >
|
|
The AllSpice Hub Auth token to use. If not provided, the autogenerated
|
|
token for the run is used.
|
|
required: false
|
|
default: ${{ github.token }}
|
|
runs:
|
|
using: "docker"
|
|
image: "Dockerfile"
|
|
args:
|
|
- "--source_ref"
|
|
- ${{ github.sha }}
|
|
- "--allspice_hub_url"
|
|
- ${{ github.server_url }}
|
|
- "--columns"
|
|
- ${{ inputs.columns }}
|
|
- "--group_by"
|
|
- ${{ inputs.group_by }}
|
|
- "--variant"
|
|
- ${{ inputs.variant }}
|
|
- "--output_file"
|
|
- "${{ github.workspace}}/${{ inputs.output_file_name }}"
|
|
- "--log-level"
|
|
- ${{ inputs.log_level }}
|
|
- ${{ github.repository }}
|
|
- ${{ inputs.source_path }}
|
|
env:
|
|
ALLSPICE_AUTH_TOKEN: ${{ inputs.auth_token }}
|