Create boilerplate template from example #1
@ -1,8 +1,8 @@
|
||||
FROM python:3.12-bookworm
|
||||
|
||||
COPY requirements.txt /requirements.txt
|
||||
COPY entrypoint.py /entrypoint.py
|
||||
COPY Add-on-script.py /Add-on-script.py
|
||||
|
||||
RUN pip install -r /requirements.txt
|
||||
|
||||
ENTRYPOINT [ "/entrypoint.py" ]
|
||||
ENTRYPOINT [ "/Add-on-script.py" ]
|
||||
|
54
action.yml
54
action.yml
@ -1,53 +1,51 @@
|
||||
name: "Generate BOM"
|
||||
name: "Hardware DevOps Action"
|
||||
description: >
|
||||
Generate a BOM for the project using py-allspice and attach it as an artifact
|
||||
to the run.
|
||||
|
||||
Works for Altium and OrCAD projects.
|
||||
A generic AllSpice Action Add-on for hardware development tasks such as schematic review,
|
||||
PCB review, ECO review, and release. This action demonstrates defining parameters
|
||||
for these tasks and utilizing GitHub context information.
|
||||
|
||||
inputs:
|
||||
source_path:
|
||||
description: >
|
||||
Path to the source file from the root of the repo. For Altium projects,
|
||||
this should be the path to the .PrjPcb file. For OrCAD projects, this
|
||||
should be the path to the .dsn file.
|
||||
Path to the source file or directory from the root of the repo. For example,
|
||||
the path to a schematic or PCB file.
|
||||
required: true
|
||||
output_file_name:
|
||||
description: "Name of the output file"
|
||||
required: true
|
||||
default: "bom.csv"
|
||||
columns:
|
||||
default: "output.txt"
|
||||
config_file:
|
||||
description: >
|
||||
A path to a JSON file mapping columns to the attributes they are from.
|
||||
Path to a configuration file for the task.
|
||||
required: true
|
||||
group_by:
|
||||
task_type:
|
||||
description: >
|
||||
A comma-separated list of columns to group the BOM by. If not present, the
|
||||
BOM will be flat.
|
||||
default: ""
|
||||
variant:
|
||||
The type of hardware task to perform. Options include 'Schematic-Review',
|
||||
'PCB-Review', 'ECO-Review', 'Release'.
|
||||
default: "Schematic-Review"
|
||||
additional_params:
|
||||
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: ""
|
||||
Any additional parameters required for the task, provided as a JSON string.
|
||||
default: "{}"
|
||||
|
||||
runs:
|
||||
using: "docker"
|
||||
image: "Dockerfile"
|
||||
args:
|
||||
- "--source_ref"
|
||||
- ${{ github.sha }}
|
||||
- "--allspice_hub_url"
|
||||
- "--server_url"
|
||||
- ${{ github.server_url }}
|
||||
- "--columns"
|
||||
- ${{ inputs.columns }}
|
||||
- "--group_by"
|
||||
- ${{ inputs.group_by }}
|
||||
- "--variant"
|
||||
- ${{ inputs.variant }}
|
||||
- "--config_file"
|
||||
- ${{ inputs.config_file }}
|
||||
- "--task_type"
|
||||
- ${{ inputs.task_type }}
|
||||
- "--additional_params"
|
||||
- ${{ inputs.additional_params }}
|
||||
- "--output_file"
|
||||
- "${{ github.workspace}}/${{ inputs.output_file_name }}"
|
||||
- ${{ github.repository }}
|
||||
- ${{ inputs.source_path }}
|
||||
|
||||
env:
|
||||
ALLSPICE_AUTH_TOKEN: ${{ github.token }}
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
Loading…
Reference in New Issue
Block a user