45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
when:
|
|
event: push
|
|
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
attempts: 5
|
|
backoff: 10s
|
|
|
|
steps:
|
|
- name: lint-and-test
|
|
image: python:3.12-slim
|
|
commands:
|
|
- pip install --no-cache-dir "poetry==1.8.4"
|
|
- poetry install --no-interaction --no-root
|
|
- poetry run ruff check .
|
|
- poetry run mypy fire_planner tests
|
|
- poetry run pytest -q
|
|
|
|
- name: build-and-push
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
depends_on:
|
|
- lint-and-test
|
|
settings:
|
|
# Dual-push during the Forgejo registry consolidation bake. After
|
|
# ≥14 days clean, registry.viktorbarzin.me drops out (Phase 4).
|
|
repo:
|
|
- registry.viktorbarzin.me/fire-planner
|
|
- forgejo.viktorbarzin.me/viktor/fire-planner
|
|
logins:
|
|
- registry: registry.viktorbarzin.me
|
|
username: viktorbarzin
|
|
password:
|
|
from_secret: registry-password
|
|
- registry: forgejo.viktorbarzin.me
|
|
username:
|
|
from_secret: forgejo_user
|
|
password:
|
|
from_secret: forgejo_push_token
|
|
dockerfile: Dockerfile
|
|
context: .
|
|
auto_tag: true
|
|
platforms:
|
|
- linux/amd64
|