50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
name: Create STL
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
label:
|
|
description: 'Your name'
|
|
default: 'Zero Cool'
|
|
required: true
|
|
type: string
|
|
icon:
|
|
description: 'Little icon above the label'
|
|
default: thing-logos/glider.dxf
|
|
type: choice
|
|
required: false
|
|
options:
|
|
- thing-logos/glider.dxf
|
|
- thing-logos/camprocket.dxf
|
|
- thing-logos/Club_mate_logo.dxf
|
|
- thing-logos/chaosknoten.dxf
|
|
|
|
jobs:
|
|
|
|
stl:
|
|
runs-on: docker
|
|
container:
|
|
image: node:alpine
|
|
|
|
steps:
|
|
- name: Install depdencies
|
|
run: apk add git openscad envsubst
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Generate OpenSCAD file
|
|
run: cat ci-template.scad | envsubst | tee ci.scad
|
|
env:
|
|
LABEL: "${{ inputs.label }}"
|
|
ICON: "${{ inputs.icon }}"
|
|
|
|
- name: Render to STL
|
|
run: openscad --export-format binstl -o ci.stl ci.scad
|
|
|
|
- uses: https://git.telodendria.io/actions/upload-artifact@v4
|
|
with:
|
|
name: bottle-clip.stl
|
|
path: ci.stl
|
|
overwrite: true
|