Add yamllint action (#110)

This commit is contained in:
NULL
2024-02-08 22:41:50 +02:00
committed by GitHub
parent f88e65f91e
commit 13560e782e
22 changed files with 143 additions and 51 deletions

View File

@@ -10,4 +10,4 @@ jobs:
app: klipper
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@@ -10,4 +10,4 @@ jobs:
app: klipperscreen
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@@ -10,4 +10,4 @@ jobs:
app: moonraker
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@@ -10,4 +10,4 @@ jobs:
app: ustreamer
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@@ -15,4 +15,4 @@ jobs:
short-description: "Klipper is a 3d-Printer firmware."
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@@ -15,4 +15,4 @@ jobs:
short-description: "KlipperScreen is a touchscreen GUI that interfaces with Klipper via Moonraker."
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@@ -15,4 +15,4 @@ jobs:
short-description: "Web API used to interact with the 3D printing firmware Klipper."
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

View File

@@ -15,4 +15,4 @@ jobs:
short-description: "µStreamer is a lightweight and very quick server to stream MJPEG video"
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

11
.github/workflows/pr-yamllint.yaml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: YAML Lint
on: pull_request
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run yamllint
uses: reviewdog/action-yamllint@v1

View File

@@ -20,13 +20,13 @@ jobs:
image-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Update Docker Hub Description"
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/${{ inputs.app }}
short-description: ${{ inputs.short-description }}
readme-filepath: ./docker/${{ inputs.app }}/README.md
enable-url-completion: true
- uses: actions/checkout@v4
- name: "Update Docker Hub Description"
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: ${{ secrets.DOCKERHUB_USERNAME }}/${{ inputs.app }}
short-description: ${{ inputs.short-description }}
readme-filepath: ./docker/${{ inputs.app }}/README.md
enable-url-completion: true

9
.yamllint.yaml Normal file
View File

@@ -0,0 +1,9 @@
extends: default
rules:
document-start:
present: false
line-length:
max: 180
truthy:
check-keys: false

View File

@@ -1,10 +1,10 @@
serial:
additionalPorts:
- /opt/printer_data/run/klipper.tty
- /opt/printer_data/run/klipper.tty
autoconnect: true
port: /opt/printer_data/run/klipper.tty
webcam:
snapshot: http://webcam:8080/snapshot
stream: /webcam/stream
accessControl:
userfile: /octoprint/octoprint/users.yaml
userfile: /octoprint/octoprint/users.yaml

View File

@@ -12,14 +12,22 @@
## * https://github.com/nicolargo/glances is used to generate and display metrics
##
## Setup
## 1. Add your personal config to this file and copy it to the root of the repository, overwriting the existing docker-compose.override.yaml
## 1. Add your personal config to this file and copy it to the root of the repository,
## overwriting the existing docker-compose.override.yaml
## 2. start the stack as described in the main readme using profiles of your choice
## Ustreamer base Service
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30
## Add your personal config here
services:
@@ -54,4 +62,4 @@ services:
traefik.http.routers.webcam.rule: PathPrefix(`/webcam`)
traefik.http.routers.webcam.entrypoints: web
traefik.http.middlewares.webcam.stripprefix.prefixes: /webcam
traefik.http.routers.webcam.middlewares: webcam
traefik.http.routers.webcam.middlewares: webcam

View File

@@ -14,20 +14,29 @@
## * timelapses will be saved to `/opt/timelapse` on the host machine
##
## Setup
## 1. Add the gcode macros provided by moonraker-timelapse to your printers configuration file https://github.com/mainsail-crew/moonraker-timelapse/blob/main/klipper_macro/timelapse.cfg
## 1. Add the gcode macros provided by moonraker-timelapse to your printers configuration file
## https://github.com/mainsail-crew/moonraker-timelapse/blob/main/klipper_macro/timelapse.cfg
## 2. Add the following to your moonraker.conf
## ```
## [timelapse]
## output_path: /opt/timelapse/
## ```
## 3. Add your personal config to this file and copy it to the root of the repository, overwriting the existing docker-compose.override.yaml
## 3. Add your personal config to this file and copy it to the root of the repository,
## overwriting the existing docker-compose.override.yaml
## 4. start the stack as described in the main readme using mainsail or fluidd as profile
## Ustreamer base Service
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30
## Add your personal config here
services:
@@ -68,4 +77,4 @@ services:
traefik.http.routers.webcam.rule: PathPrefix(`/webcam`)
traefik.http.routers.webcam.entrypoints: web
traefik.http.middlewares.webcam.stripprefix.prefixes: /webcam
traefik.http.routers.webcam.middlewares: webcam
traefik.http.routers.webcam.middlewares: webcam

View File

@@ -1,6 +1,6 @@
## Usecase: Run multiple Printers on the same Host
##
## Assumptions:
## Assumptions:
## * I have two printers
## * One is called printer1, the other one printer2
## * printer1 is using serial port /dev/ttyUSB0 and webcam /dev/video0
@@ -55,7 +55,14 @@ x-moonraker-svc: &moonraker-svc
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30
## Service Definitions
services:
@@ -64,13 +71,20 @@ services:
## Access api via port 8101/tcp and webcam via 8102/tcp
printer1-klipper:
<<: *klipper-svc
command: -I printer_data/run/printer1.klipper.tty -a printer_data/run/printer1.klipper.sock printer_data/config/printer1.cfg -l printer_data/logs/printer1.klippy.log
command: >
-I printer_data/run/printer1.klipper.tty
-a printer_data/run/printer1.klipper.sock
printer_data/config/printer1.cfg
-l printer_data/logs/printer1.klippy.log
labels:
org.prind.service: klipper
org.prind.printer: printer1
printer1-moonraker:
<<: *moonraker-svc
command: -d printer_data -c printer_data/config/printer1.moonraker.conf -l printer_data/logs/printer1.moonraker.log
command: >
-d printer_data
-c printer_data/config/printer1.moonraker.conf
-l printer_data/logs/printer1.moonraker.log
ports:
- 8101:7125
labels:
@@ -90,13 +104,20 @@ services:
## Access api via port 8201/tcp and webcam via 8202/tcp
printer2-klipper:
<<: *klipper-svc
command: -I printer_data/run/printer2.klipper.tty -a printer_data/run/printer2.klipper.sock printer_data/config/printer2.cfg -l printer_data/logs/printer2.klippy.log
command: >
-I printer_data/run/printer2.klipper.tty
-a printer_data/run/printer2.klipper.sock
printer_data/config/printer2.cfg
-l printer_data/logs/printer2.klippy.log
labels:
org.prind.service: klipper
org.prind.printer: printer2
printer2-moonraker:
<<: *moonraker-svc
command: -d printer_data -c printer_data/config/printer2.moonraker.conf -l printer_data/logs/printer2.moonraker.log
command: >
-d printer_data
-c printer_data/config/printer2.moonraker.conf
-l printer_data/logs/printer2.moonraker.log
ports:
- 8201:7125
labels:
@@ -124,4 +145,4 @@ services:
volumes:
run:
gcode:
log:
log:

View File

@@ -29,7 +29,11 @@ services:
depends_on:
init:
condition: service_completed_successfully
command: -I printer_data/run/klipper.tty -a printer_data/run/klipper.sock printer_data/config/printer.cfg -l printer_data/logs/klippy.log
command: >
-I printer_data/run/klipper.tty
-a printer_data/run/klipper.sock
printer_data/config/printer.cfg
-l printer_data/logs/klippy.log
volumes:
- /dev:/dev
- ./config:/opt/printer_data/config
@@ -70,7 +74,14 @@ services:
webcam:
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30
devices:
- /dev/video0:/dev/webcam
labels:
@@ -111,7 +122,7 @@ services:
- "80:80"
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
org.prind.service: traefik

View File

@@ -12,17 +12,25 @@
## * init container will set the permissions to the new UID/GID
##
## Setup
## 1. Add your personal config to this file and copy it to the root of the repository, overwriting the existing docker-compose.override.yaml
## 2. Replace the example UID and GID of '4242' in the 'dockerfile_inline' block of the klipper and moonraker services,
## 1. Add your personal config to this file and copy it to the root of the repository,
## overwriting the existing docker-compose.override.yaml
## 2. Replace the example UID and GID of '4242' in the 'dockerfile_inline' block of the klipper and moonraker services,
## as well as in the command of the init service with your specific requirements.
## Make sure to use the identical UIDs/GIDs in klipper and moonraker.
## 3. start the stack as described in the main readme using a profile of your choice.
## 3. start the stack as described in the main readme using a profile of your choice.
## Ustreamer base Service
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30
## Add your personal config here
services:
@@ -60,4 +68,4 @@ services:
traefik.http.routers.webcam.rule: PathPrefix(`/webcam`)
traefik.http.routers.webcam.entrypoints: web
traefik.http.middlewares.webcam.stripprefix.prefixes: /webcam
traefik.http.routers.webcam.middlewares: webcam
traefik.http.routers.webcam.middlewares: webcam

View File

@@ -4,4 +4,4 @@ services:
entrypoint: python3 /opt/klipper/scripts/calibrate_shaper.py
working_dir: /opt/resonances
volumes:
- ./resonances:/opt/resonances
- ./resonances:/opt/resonances

View File

@@ -8,4 +8,4 @@ services:
volumes:
- /dev:/dev
- ./config/build.config:/opt/klipper/.config
- ./out:/opt/klipper/out
- ./out:/opt/klipper/out

View File

@@ -6,7 +6,7 @@ services:
build:
context: docker/klipper
target: build-simulavr
args:
args:
VERSION: master
privileged: true
volumes:
@@ -14,7 +14,7 @@ services:
- run:/opt/printer_data/run
labels:
org.prind.service: simulavr
## Reconfigure Klipper service for simulavr
klipper:
depends_on:
@@ -22,4 +22,8 @@ services:
condition: service_completed_successfully
simulavr:
condition: service_started
command: -I printer_data/run/klipper.tty -a printer_data/run/klipper.sock printer_data/config/printer-simulavr.cfg -l printer_data/logs/klippy.log
command: >
-I printer_data/run/klipper.tty
-a printer_data/run/klipper.sock
printer_data/config/printer-simulavr.cfg
-l printer_data/logs/klippy.log

View File

@@ -2,7 +2,14 @@
x-ustreamer-svc: &ustreamer-svc
image: mkuf/ustreamer:latest
restart: unless-stopped
command: --host=0.0.0.0 --port=8080 --slowdown --device=/dev/webcam --resolution=1280x960 --format=MJPEG --desired-fps=30
command: >
--host=0.0.0.0
--port=8080
--slowdown
--device=/dev/webcam
--resolution=1280x960
--format=MJPEG
--desired-fps=30
## Add your personal config here
services:
@@ -17,4 +24,4 @@ services:
traefik.http.routers.webcam.rule: PathPrefix(`/webcam`)
traefik.http.routers.webcam.entrypoints: web
traefik.http.middlewares.webcam.stripprefix.prefixes: /webcam
traefik.http.routers.webcam.middlewares: webcam
traefik.http.routers.webcam.middlewares: webcam

View File

@@ -12,7 +12,11 @@ services:
depends_on:
init:
condition: service_completed_successfully
command: -I printer_data/run/klipper.tty -a printer_data/run/klipper.sock printer_data/config/printer.cfg -l printer_data/logs/klippy.log
command: >
-I printer_data/run/klipper.tty
-a printer_data/run/klipper.sock
printer_data/config/printer.cfg
-l printer_data/logs/klippy.log
volumes:
- /dev:/dev
- ./config:/opt/printer_data/config
@@ -196,7 +200,7 @@ services:
- "80:80"
restart: unless-stopped
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
org.prind.service: traefik