Hello, world
Some checks failed
docker-image / docker (push) Failing after 25s

This commit is contained in:
Stefan Bethke 2025-05-30 19:04:13 +02:00
commit d702695b3b
6 changed files with 108 additions and 0 deletions

View file

@ -0,0 +1,31 @@
name: docker-image
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: git.hamburg.ccc.de
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: git.hamburg.ccc.de/ccchh/hmdooris/hmdooris:latest

15
Dockerfile Normal file
View file

@ -0,0 +1,15 @@
FROM docker.io/library/debian:12-slim AS builder
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes python3 pipx
ENV PATH="/root/.local/bin:${PATH}"
RUN pipx install poetry
RUN pipx inject poetry poetry-plugin-bundle
WORKDIR /src
COPY . .
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN poetry bundle venv --python=/usr/bin/python3 --only=main /venv
FROM gcr.io/distroless/python3-debian12
COPY --from=builder /venv /venv
COPY buba/ /buba
ENTRYPOINT ["/venv/bin/python", "-m", "hmdooris"]

0
buba/__init__.py Normal file
View file

9
buba/__main__.py Normal file
View file

@ -0,0 +1,9 @@
from pyfis.aegmis import MIS1TextDisplay
display = MIS1TextDisplay("/dev/ttyUSB3",)
display.simple_text(page=1, row=0, col=0, text="MEOW MEOW MEOW MEOW MEOW MEOW MEOW MEOW", align=display.ALIGN_CENTER)
display.simple_text(page=1, row=1, col=0, text="MEOW MEOW MEOW MEOW MEOW MEOW MEOW MEOW", align=display.ALIGN_CENTER)
display.simple_text(page=1, row=2, col=0, text="MEOW MEOW MEOW MEOW MEOW MEOW MEOW MEOW", align=display.ALIGN_CENTER)
display.simple_text(page=1, row=3, col=0, text="MEOW MEOW MEOW MEOW MEOW MEOW MEOW MEOW", align=display.ALIGN_CENTER)

36
poetry.lock generated Normal file
View file

@ -0,0 +1,36 @@
# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand.
[[package]]
name = "pyfis"
version = "1.13.0"
description = "A library for controlling devices in the passenger information realm"
optional = false
python-versions = "*"
groups = ["main"]
files = [
{file = "pyFIS-1.13.0-py3-none-any.whl", hash = "sha256:fe70ec50cf19443ca4c806dc812c72d6a0c1bdac845792518234e4632a10f14d"},
{file = "pyFIS-1.13.0.tar.gz", hash = "sha256:bd064534b422d01ab55c4335a8ba22591605e95de919e5da0e6f38e5f38efdb8"},
]
[package.dependencies]
pyserial = "*"
[[package]]
name = "pyserial"
version = "3.5"
description = "Python Serial Port Extension"
optional = false
python-versions = "*"
groups = ["main"]
files = [
{file = "pyserial-3.5-py2.py3-none-any.whl", hash = "sha256:c4451db6ba391ca6ca299fb3ec7bae67a5c55dde170964c7a14ceefec02f2cf0"},
{file = "pyserial-3.5.tar.gz", hash = "sha256:3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb"},
]
[package.extras]
cp2110 = ["hidapi"]
[metadata]
lock-version = "2.1"
python-versions = ">=3.10,<4.0"
content-hash = "26406bd0806bf5a00f187b6cbe55ea0b681e558d2af61096a298196d659a869f"

17
pyproject.toml Normal file
View file

@ -0,0 +1,17 @@
[project]
name = "buba"
version = "0.1.0"
description = ""
authors = [
{name = "Stefan Bethke",email = "stb@lassitu.de"}
]
readme = "README.md"
requires-python = ">=3.10,<4.0"
dependencies = [
"pyfis (>=1.13.0,<2.0.0)"
]
[build-system]
requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"