Set up CI
This commit is contained in:
parent
01fb747a6d
commit
23fa5a3f4b
2 changed files with 53 additions and 0 deletions
50
.forgejo/workflows/stl.yaml
Normal file
50
.forgejo/workflows/stl.yaml
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
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:
|
||||||
|
|
||||||
|
openscad:
|
||||||
|
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: envsubst -i ci-template.scad > ci.scad
|
||||||
|
env:
|
||||||
|
LABEL: "${{ inputs.label }}"
|
||||||
|
ICON: "${{ inputs.icon }}"
|
||||||
|
|
||||||
|
- name: Render to STL
|
||||||
|
run: openscad ci.scad --export-format binstl -o ci.stl ci.scad
|
||||||
|
|
||||||
|
# - uses: actions/upload-artifact@v4
|
||||||
|
# with:
|
||||||
|
# name: bottle-clip.stl
|
||||||
|
# path: ci.stl
|
||||||
|
# overwrite: true
|
3
ci-template.scad
Normal file
3
ci-template.scad
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
include <bottle-clip.scad>
|
||||||
|
|
||||||
|
bottle_clip(name="$LABEL", logo="$ICON");
|
Loading…
Add table
Add a link
Reference in a new issue