Use Forgejo workflows and registry
All checks were successful
publish-latest / docker (push) Successful in 9s
ci / test (3.10) (push) Successful in 19s
ci / test (3.12) (push) Successful in 19s
ci / test (3.13) (push) Successful in 19s
ci / container (push) Successful in 7s
publish-image / docker (push) Successful in 8s

This commit is contained in:
Johan Lundberg 2026-07-30 23:35:14 +02:00
parent dbc7464b58
commit e7bde2b3f4
12 changed files with 134 additions and 40 deletions

View file

@ -0,0 +1,69 @@
name: Bug report
about: Report reproducible incorrect behavior
title: "[Bug]: "
ref: main
labels:
- bug
body:
- type: markdown
attributes:
value: |
Do not include credentials, private addresses, AP names, `config.ini`,
`.env`, `state.json`, or unredacted logs. Report security issues using
the private process in SECURITY.md.
- type: input
id: version
attributes:
label: Version or commit
placeholder: v0.1.0 or commit SHA
validations:
required: true
- type: dropdown
id: installation
attributes:
label: Installation mode
options:
- Docker Compose
- systemd
- Manual Python invocation
validations:
required: true
- type: input
id: runtime
attributes:
label: Runtime
description: Python version, or Docker Engine and Compose versions
validations:
required: true
- type: input
id: controller
attributes:
label: Controller model and IOS XE version
description: Do not include hostnames, addresses, serial numbers, or AP names.
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual behavior and redacted logs
validations:
required: true
- type: checkboxes
id: privacy
attributes:
label: Data-safety confirmation
options:
- label: I removed credentials, private infrastructure details, and personal data.
required: true

View file

@ -0,0 +1,18 @@
## Summary
Describe the problem and the focused solution.
## Verification
- [ ] `python -m py_compile wlc_monitor.py`
- [ ] `python -m unittest discover -v`
- [ ] `python -m pip check`
- [ ] Docker checks run, or not applicable
- [ ] User-facing documentation updated, or not applicable
- [ ] No credentials, private infrastructure data, runtime state, or personal data
are present in the diff
## Operational impact
Call out compatibility, configuration, alerting, state-migration, or deployment
effects.

47
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,47 @@
name: ci
on:
push:
pull_request:
jobs:
test:
runs-on: docker
container:
image: catthehacker/ubuntu:act-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements.txt
- run: python -m py_compile wlc_monitor.py
- run: python -m unittest discover -v
- run: python -m pip check
container:
runs-on: docker
container:
image: catthehacker/ubuntu:act-22.04
volumes:
- /certs/client:/certs/client
env:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: /certs/client
steps:
- uses: actions/checkout@v4
- uses: docker/build-push-action@v6
with:
context: .
target: prod
push: false
tags: wlc-monitor:test

View file

@ -0,0 +1,42 @@
name: publish-latest
on:
push:
branches: [main]
jobs:
docker:
runs-on: docker
container:
image: catthehacker/ubuntu:act-22.04
volumes:
- /certs/client:/certs/client
env:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: /certs/client
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: git.snakedesert.se
# Forgejo exposes github.* compatibility aliases; this matches the
# established Porchlight workflow and works with older runners.
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: git.snakedesert.se/${{ github.repository }}
tags: |
type=raw,value=edge
type=sha,format=short
- uses: docker/build-push-action@v6
with:
context: .
target: prod
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View file

@ -0,0 +1,43 @@
name: publish-image
on:
push:
tags: ['v*']
jobs:
docker:
runs-on: docker
container:
image: catthehacker/ubuntu:act-22.04
volumes:
- /certs/client:/certs/client
env:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_VERIFY: "1"
DOCKER_CERT_PATH: /certs/client
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: git.snakedesert.se
# Forgejo exposes github.* compatibility aliases; this matches the
# established Porchlight workflow and works with older runners.
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: git.snakedesert.se/${{ github.repository }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=raw,value=latest
- uses: docker/build-push-action@v6
with:
context: .
target: prod
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}