Skip to content

Create i-BOM

Create i-BOM #104

Workflow file for this run

name: Create i-BOM
on:
push:
paths:
- 'board.json'
- 'board.brd'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# This workflow contains a single job called "build_iBOM"
jobs:
build:
name: create ibom on push
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Update System and install sys necessities
run: |
sudo apt-get update -y
sudo apt-get install -y software-properties-common xvfb
sudo apt-get install -y libsdl2-2.0-0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install python dependencies
run: |
sudo python -m pip install --upgrade pip
sudo python -m pip install --upgrade pip setuptools wheel
sudo python -m pip install pyinstaller
sudo python -m pip install pillow
sudo pip install jsonschema
sudo python -m pip install "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/wxPython-4.1.1-cp38-cp38-linux_x86_64.whl"
- name: Clone InteractiveHtmlBom creator
run: sudo git clone https://github.com/openscopeproject/InteractiveHtmlBom.git
- name: Create ibom.html
run: |
ARGS="--layer-view FB --hide-silkscreen --highlight-pin1 --no-blacklist-virtual"
JSON_PATH="*.json"
mkdir output
OUTPUT_PATH="$(pwd)/output"
sudo xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 InteractiveHtmlBom/InteractiveHtmlBom/generate_interactive_bom.py --no-browser $ARGS $JSON_PATH --dest-dir $OUTPUT_PATH
- name: upload html
uses: actions/upload-artifact@v4
with:
name: html_file
path: output
deploy:
name: host on gh pages
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/checkout@v4
- name: Download build
uses: actions/download-artifact@v4
with:
name: html_file
path: output
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: .