mirror of
https://github.com/AllSpiceIO/cofactr-cogs.git
synced 2025-04-10 06:40:08 +00:00
65 lines
2.0 KiB
YAML
65 lines
2.0 KiB
YAML
name: "Generate COGS using Cofactr"
|
|
description: >
|
|
Generate cost of goods sold (COGS) using Cofactr.
|
|
inputs:
|
|
bom_file:
|
|
description: "Path to the BOM CSV file"
|
|
required: true
|
|
quantities:
|
|
description: >
|
|
A comma-separated list of quantities of PCBs to compute the COGS for. E.g.
|
|
1,10,100,1000. Defaults to the example.
|
|
default: "1,10,100,1000"
|
|
bom_part_number_column:
|
|
description: >
|
|
The name of the part number column in the BOM file. Defaults to 'Part
|
|
Number'.
|
|
default: Part Number
|
|
bom_manufacturer_column:
|
|
description: >
|
|
The name of the manufacturer column in the BOM file. Defaults to ''. If
|
|
you use a search strategy that uses manufacturer, you must provide this.
|
|
default: ''
|
|
bom_quantity_column:
|
|
description: >
|
|
The name of the quantity column in the BOM file. Defaults to 'Quantity'.
|
|
default: Quantity
|
|
search_strategy:
|
|
description: >
|
|
The Cofactr search strategy. Can be: "default" (uses mpn), "mpn_sku_mfr",
|
|
"mpn_exact", "mpn_exact_mfr". Defaults to "mpn_sku_mfr". See Cofactr API
|
|
documentation for more information on search strategies.
|
|
default: mpn_sku_mfr
|
|
output_file:
|
|
description: >
|
|
The path to the output file. Defaults to stdout, i.e. printing to the
|
|
console.
|
|
default: ''
|
|
api_key:
|
|
description: "Cofactr API Key"
|
|
required: true
|
|
client_id:
|
|
description: "Cofactr Client ID"
|
|
required: true
|
|
runs:
|
|
using: "docker"
|
|
image: "Dockerfile"
|
|
args:
|
|
- "--quantities"
|
|
- "${{ inputs.quantities }}"
|
|
- "--bom-part-number-column"
|
|
- ${{ inputs.bom_part_number_column }}
|
|
- "--bom-manufacturer-column"
|
|
- ${{ inputs.bom_manufacturer_column }}
|
|
- "--bom-quantity-column"
|
|
- ${{ inputs.bom_quantity_column }}
|
|
- "--search-strategy"
|
|
- ${{ inputs.search_strategy }}
|
|
- "--output-file"
|
|
- ${{ inputs.output_file }}
|
|
- ${{ inputs.bom_file }}
|
|
env:
|
|
ALLSPICE_AUTH_TOKEN: ${{ github.token }}
|
|
COFACTR_API_KEY: ${{ inputs.api_key }}
|
|
COFACTR_CLIENT_ID: ${{ inputs.client_id }}
|