[Github Action] Added option to install 3D models

This commit is contained in:
Salvador E. Tropea 2022-09-14 12:43:36 -03:00
parent d51791f197
commit 948fc9aeaa
3 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,6 @@
FROM setsoft/kicad_auto:dev
FROM setsoft/kicad_auto:dev_k6
LABEL AUTHOR Salvador E. Tropea <stropea@inti.gob.ar>
LABEL Description="Export various files from KiCad projects (KiCad 5 + development)"
LABEL Description="Export various files from KiCad projects (KiCad 6 + development)"
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View File

@ -39,6 +39,10 @@ inputs:
description: 'Global variant to use [default: no variants]'
required: false
default: '__NONE__'
install3D:
description: 'Install the 3D models, use YES [default: NO]'
required: false
default: 'NO'
verbose:
description: 'Verbosity level [default: 0]'
required: false
@ -56,6 +60,7 @@ runs:
- -t ${{ inputs.targets }}
- -v ${{ inputs.verbose }}
- -V ${{ inputs.variant }}
- -i ${{ inputs.install3D }}
branding:
icon: 'cpu'
color: 'green'

View File

@ -12,6 +12,7 @@ DIR=""
VARIANT=""
TARGETS=""
QUICKSTART="NO"
INSTALL3D="NO"
# Exit error code
EXIT_ERROR=1
@ -44,6 +45,7 @@ function msg_help {
echo -e " '-s PRES' skip preflights, comma separated or 'all'"
echo -e " '-t TARGETS' list of targets to generate separated by spaces. To only run preflights use __NONE__."
echo -e " '-V VARIANT' global variant"
echo -e " '-i YES' install the 3D models."
echo -e "\nMiscellaneous:"
echo -e " '-v LEVEL' annotate program execution"
@ -123,6 +125,8 @@ function args_process {
;;
-q) QUICKSTART="$VAL"
;;
-i) INSTALL3D="$VAL"
;;
-s) if [ "$VAL" == "__NONE__" ]; then
SKIP=""
else
@ -157,6 +161,10 @@ function run {
/usr/bin/kicad-git-filters.py
fi
if [ $INSTALL3D == "YES" ]; then
/usr/bin/kicad_3d_install.sh
fi
if [ $QUICKSTART == "YES" ]; then
echo Quick-start options: $VERBOSE --quick-start
/bin/bash -c "kibot $VERBOSE --quick-start"