Test for if panel file exhists #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Datapack | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Use current repo commit that triggered this build. | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Run bash command to get kicad file name. | |
- name: Get Kicad Project Name | |
run: echo "PROJECT_NAME=$(basename *.kicad_pro .kicad_pro)" >> $GITHUB_ENV | |
# Checkout kibot config repo | |
- name: Get Kibot Config | |
uses: actions/checkout@v4 | |
with: | |
repository: Cimos/kibot-config | |
path: ./kibot-config | |
ref: 1-add-penalization-to-build | |
# Build datapack | |
- name: Build Datapack | |
uses: INTI-CMNB/[email protected] | |
with: | |
config: kibot-config/build.kibot.yaml | |
dir: output | |
schema: '${{ env.PROJECT_NAME }}.kicad_sch' | |
board: '${{ env.PROJECT_NAME }}.kicad_pcb' | |
# log: log/log.log | |
# verbose: 2 | |
# Update artifacts | |
- name: Upload Results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PROJECT_NAME }}-datapack | |
path: output | |
# Don't think this is supported yet. | |
# - name: Upload Kibot Log File | |
# uses: actions/upload-artifact@v4 | |
# if: always() | |
# with: | |
# name: kibot-logs | |
# path: logs | |
# if-no-files-found: error | |
# - name: Commit files | |
- name: Check file existence | |
id: check_files | |
uses: andstor/file-existence-action@v4 | |
with: | |
files: "panelization.yaml" | |
- name: File exists | |
if: steps.check_files.outputs.files_exists == 'true' | |
uses: INTI-CMNB/[email protected] | |
with: | |
config: kibot-config/build.panel.yaml | |
dir: output | |
schema: '${{ env.PROJECT_NAME }}.kicad_sch' | |
board: '${{ env.PROJECT_NAME }}.kicad_pcb' | |
# log: log/log.log | |
# verbose: 2 |