63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
when:
|
|
- event: push
|
|
branch: main
|
|
- event: manual
|
|
|
|
steps:
|
|
sync:
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
volumes:
|
|
- uv-cache:/uv-cache
|
|
environment:
|
|
UV_CACHE_DIR: /uv-cache
|
|
UV_LINK_MODE: copy
|
|
commands:
|
|
- uv sync
|
|
test:
|
|
#image: ghcr.io/astral-sh/uv:alpine
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
commands:
|
|
- .venv/bin/pytest -s tests/basic.py
|
|
build:
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
volumes:
|
|
- uv-cache:/uv-cache
|
|
environment:
|
|
UV_CACHE_DIR: /uv-cache
|
|
UV_LINK_MODE: copy
|
|
commands:
|
|
- uv build --wheel
|
|
- uv cache prune --ci
|
|
|
|
get_tag:
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
commands:
|
|
- echo $CI_COMMIT_TAG
|
|
if_tag:
|
|
image: ghcr.io/astral-sh/uv:python3.13-alpine
|
|
commands:
|
|
- echo It's a tag!
|
|
|
|
|
|
|
|
|
|
push_python:
|
|
# TODO: when git tag
|
|
image: code.philo.ydns.eu/philorg/twine
|
|
environment:
|
|
OWNER: philorg
|
|
REGISTRY_URL: https://code.philo.ydns.eu
|
|
USERNAME:
|
|
from_secret: forgejo_username
|
|
PASSWORD:
|
|
from_secret: forgejo_password
|
|
commands:
|
|
- twine upload --repository-url $REGISTRY_URL/api/packages/$OWNER/pypi -u $USERNAME -p $PASSWORD --non-interactive dist/*.whl
|
|
|
|
# TODO: container
|
|
# For podman build: see https://woodpecker-ci.org/blog/podman-image-build-sigstore
|
|
# podman-privileged-test:
|
|
# image: quay.io/podman/stable
|
|
# commands:
|
|
# - echo From https://docs.gitlab.com/runner/executors/kubernetes/use_podman_with_kubernetes/
|
|
# - podman build . -t playground-bis:testing
|