2024-04-08 19:21:06 -04:00

39 lines
1.1 KiB
YAML

name: "Generate BOM"
description: >
Generate a BOM for the project using py-allspice and create an asset with it.
Currently only works for Altium projects
inputs:
project_path:
description: "Path to the project file from the root of the repo"
required: true
pcb_path:
description: "Path to the PCB file from the root of the repo"
required: true
output_file_name:
description: "Name of the output file"
required: true
default: "bom.csv"
attributes_mapping:
description: "JSON string with the mapping of the attributes to the AllSpice attributes"
required: true
auth_token:
description: "AllSpice Hub authentication token"
runs:
using: "docker"
image: "Dockerfile"
args:
- "--source_ref"
- ${{ github.sha }}
- "--allspice_hub_url"
- ${{ github.server_url }}
- "--attributes_mapping"
- ${{ inputs.attributes_mapping }}
- "--output_file"
- ${{ inputs.output_file_name }}
- ${{ github.repository }}
- ${{ inputs.project_path }}
- ${{ inputs.pcb_path }}
env:
ALLSPICE_AUTH_TOKEN: ${{ inputs.auth_token }}