Skip to content

Update README.md

Update README.md #5

name: Kicad - production files generator
on:
push:
workflow_dispatch:
env:
schema: "hw/sch_pcb/SPACEDOS02B_PCB01A/SPACEDOS02B_PCB01A.kicad_sch"
board: "hw/sch_pcb/SPACEDOS02B_PCB01A/SPACEDOS02B_PCB01A.kicad_pcb"
dir: "hw/out"
kibot: "doc/assets/kibot"
jobs:
# checks
ERC:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/erc.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}
DRC:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/drc.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}
xml:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/xml.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}
- uses: actions/upload-artifact@v3
if: ${{ success() }}
with:
name: doc_xml
path: hw/sch_pcb/*.xml
# documentation
schematics:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/schematics.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}_docs
- uses: actions/upload-artifact@v3
if: ${{ success() }}
with:
name: doc_sch
path: ${{ env.dir }}_docs/**
placement:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/placement.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}_docs
# Zde se zahazuji debugovaci videa
- uses: actions/upload-artifact@v3
if: ${{ success() }}
with:
name: doc_placement
path: ${{ env.dir }}_docs/**/*.pdf
pnp:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/pnp.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}_docs
# Zde se zahazuji debugovaci videa
- uses: actions/upload-artifact@v3
if: ${{ success() }}
with:
name: doc_pnp
path: ${{ env.dir }}_docs/
# fabrications
gerbers:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/gerbers.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}_gerbers
verbose: 3
- uses: actions/upload-artifact@v2
if: ${{ success() }}
with:
name: hw_cam_profi
path: ${{ env.dir }}_gerbers/gerbers/**
cad:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/cad.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}_cad
- uses: actions/upload-artifact@v3
if: ${{ success() }}
with:
name: doc_cad
path: ${{ env.dir }}_cad/**
render:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.pat }}
ref: ${{ github.head_ref }}
- uses: MLAB-project/KiBot@master
with:
config: ${{ env.kibot }}/render.kibot.yaml
schema: ${{ env.schema }}
board: ${{ env.board }}
dir: ${{ env.dir }}_img
verbose: 3
- uses: actions/upload-artifact@v3
if: ${{ success() }}
with:
name: doc_img
path: ${{ env.dir }}_img/img/**
UPDATE_REPO:
runs-on: ubuntu-latest
name: Update repozitory.
needs: [render, cad, gerbers, schematics, pnp, xml, placement]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- run: git pull --force --rebase || true
- name: Download a Build Artifact
uses: actions/download-artifact@v3.0.0
# - name: Remove old manufarturing data
# run: |
# rm -r hw/cam_profi || true
# rw -r doc/gen || true
- name: Extract to right position
run: |
mkdir doc || true
mkdir doc/gen || true
mkdir doc/gen/img || true
mkdir doc/img/render || true
mkdir hw || true
mkdir hw/cam_profi || true
cp doc/assets/kibot/autogenerated.md hw/cam_profi.readme.md || true
cp -r doc_img/* doc/gen/img || true
cp -r doc_cad/cad/* doc/gen || true
cp -r hw_cam_profi/* hw/cam_profi || true
cp -r doc_sch/docs/* doc/gen || true
cp -r doc_xml/* doc/gen || true
cp -r doc_sch/img/pcb/* doc/gen/img || true
cp -r doc_placement/doc* hw/cam_profi || true
cp -r doc_pnp/* hw/cam_profi || true
rm -r doc_img || true
rm -r doc_cad || true
rm -r hw_cam_profi || true
rm -r doc_sch || true
rm -r doc_placement || true
rm -r doc_pnp || true
rm -r doc_xml || true
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update actions products
add_options: '-A'
commit_options: '-a'