AllSpiceAlice 522d07b7c6
All checks were successful
Generate BOM / Generate_BOM (push) Successful in 14s
Add README.md
2025-06-11 02:56:10 +00:00

77 lines
1.9 KiB
Markdown

# 📘 Generate Excel BOM from CSV
This repository demonstrates how to use the [`Actions/csv-to-excel`](https://github.com/AllSpiceHub/Actions/tree/main/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](https://github.com/AllSpiceHub/Actions).
### 📁 Files
- `.allspice/exampleBOM.csv`: A sample input file in CSV format.
- `.allspice/workflows/convert-bom-to-excel-file.yml`: A workflow you can invoke via `workflow_call` to perform the conversion.
---
## 🔧 Workflow Example
You can reuse the included workflow in your repository like this:
```yaml
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` to `bom-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).
```yaml
- 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