generate-bom-altium/action.yml

48 lines
1.3 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
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.
default: ''
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 }}"
- ${{ github.repository }}
- ${{ inputs.project_path }}
env:
ALLSPICE_AUTH_TOKEN: ${{ github.token }}