mirror of
https://staging.allspice.dev/AllSpice-Demos/Actions-demo.git
synced 2025-04-23 17:03:42 +00:00
Add step to update BOM
This commit is contained in:
parent
17db85a2f0
commit
4d393daad9
@ -17,7 +17,7 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Generate BOM
|
||||
uses: https://hub.allspice.io/Actions/generate-bom@v0.5
|
||||
uses: https://hub.allspice.io/Actions/generate-bom@v0.7
|
||||
with:
|
||||
# The path to the project file in your repo (.PrjPcb for Altium, .DSN for OrCad).
|
||||
source_path: Archimajor.PrjPcb
|
||||
@ -40,8 +40,23 @@ jobs:
|
||||
- name: Show BOM
|
||||
run: cat bom.csv
|
||||
|
||||
# This is optional
|
||||
- name: Upload file as artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: BOM.csv
|
||||
path: bom.csv
|
||||
path: bom.csv
|
||||
|
||||
- name: Update BOM
|
||||
run: |
|
||||
git diff --exit-code -- bom.csv
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "No BOM changes to commit."
|
||||
else
|
||||
echo "BOM has changed. Committing changes."
|
||||
git config --global user.email "allspice-bot+${{ github.actor }}@users.noreply.github.com"
|
||||
git config --local user.name "AllSpice-bot"
|
||||
git add bom.csv
|
||||
git commit -m "Update BOM on ${{ github.ref_name }}"
|
||||
git push
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user