Gautam Peri
5a23b02eb3
All checks were successful
Generate Carbon Emission Figure for PCBA / Generate_PCBA_Carbon_Emission_Figure (push) Successful in 44s
56 lines
2.0 KiB
YAML
56 lines
2.0 KiB
YAML
# AllSpice running carbon emission calculator demo workflow
|
|
# Action triggers on push and issues
|
|
# Action runs "carbon-emission-calculator" action
|
|
# .allspice/workflows/Carbon-Emission-Calculator.yml
|
|
name: Generate Carbon Emission Figure for PCBA
|
|
on:
|
|
push:
|
|
issues:
|
|
types: [opened, closed, reopened]
|
|
|
|
jobs:
|
|
Generate_PCBA_Carbon_Emission_Figure:
|
|
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: Generate BOM
|
|
uses: https://hub.allspice.io/Actions/generate-bom@v0.3
|
|
with:
|
|
# The path to the project file in your repo (.PrjPcb for Altium, .DSN for OrCad).
|
|
source_path: Archimajor.PrjPcb
|
|
# [optional] A path to a JSON file mapping columns to the component attributes
|
|
# they are from. This file must be provided.
|
|
# Default: 'columns.json'
|
|
columns: .allspice/columns.json
|
|
# [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"
|
|
# [optional] The variant of the project to generate the BOM for. If empty
|
|
# or not present, the BOM will be generated for the default variant.
|
|
# Default: ''
|
|
variant: ""
|
|
|
|
# Print bom.csv to terminal
|
|
- name: Show BOM
|
|
run: cat bom.csv
|
|
|
|
# Upload BOM as artifact
|
|
- name: Upload file as artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: BOM.csv
|
|
path: bom.csv
|
|
|
|
- name: Generate Carbon Emission Figure for PCBA
|
|
uses: https://hub.allspice.io/Actions/carbon-emission-calculator.git@v1
|
|
with:
|
|
# The input BOM file for carbon emissions calculator
|
|
bom_file: bom.csv
|