All checks were successful
Generate BOM / Generate_BOM (push) Successful in 12s
Reviewed-on: #1
📘 Generate Excel BOM from CSV
This repository demonstrates how to use the Actions/csv-to-excel
AllSpice Action to convert a Bill of Materials (BOM) from a CSV file into an Excel (.xlsx
) file.
📂 Overview
This demo includes:
- A sample BOM file:
.allspice/exampleBOM.csv
- A reusable workflow:
.allspice/workflows/convert-bom-to-excel-file.yml
- Output: an Excel-formatted BOM file generated via GitHub Actions
🚀 How It Works
The GitHub Action in this repo triggers the conversion of a BOM file from CSV to Excel using the reusable csv-to-excel
action from the AllSpiceHub Actions collection.
📁 Files
.allspice/exampleBOM.csv
: A sample input file in CSV format..allspice/workflows/convert-bom-to-excel-file.yml
: A workflow you can invoke viaworkflow_call
to perform the conversion.
🔧 Workflow Example
You can reuse the included workflow in your repository like this:
jobs:
convert-bom:
uses: https://hub.allspice.io/Actions/csv_to_excel@v0.15
with:
source_path: ".allspice/exampleBOM.csv"
output_file_name: "bom-output.xlsx"
This job will:
- Convert
.allspice/exampleBOM.csv
tobom-output.xlsx
- Save the resulting Excel file to the GitHub Actions workspace
📁 Output
After the workflow runs, the Excel file is available at:
${{ github.workspace }}/bom-output.xlsx
You can archive it, upload it as an artifact, or check it into your repo (if desired).
- name: Upload file as artifact
uses: actions/upload-artifact@v3
with:
name: BOM.xlsx
path: bom-output.xlsx
🛠️ Requirements
- GitHub Actions runner (
ubuntu-latest
) - Docker support (required by the underlying
csv-to-excel
action)
🧾 License
MIT © AllSpice.io
Description