test-woodpecker-python/.woodpecker/build.yaml

63 lines
1.8 KiB
YAML
Raw Normal View History

2025-06-20 19:03:22 +02:00
when:
2025-06-21 14:52:59 +02:00
- event: manual
2025-06-24 11:00:01 +02:00
- event: tag
2025-06-20 19:03:22 +02:00
2025-06-24 11:16:28 +02:00
depends_on:
- test
2025-06-24 10:58:42 +02:00
2025-06-24 11:14:41 +02:00
steps:
2025-06-26 15:40:30 +02:00
python_sync:
2025-06-25 14:47:11 +02:00
image: code.philo.ydns.eu/philorg/uv
2025-06-21 17:33:17 +02:00
volumes:
2025-06-21 17:41:14 +02:00
- uv-cache:/uv-cache
2025-06-21 15:17:58 +02:00
environment:
2025-06-21 17:26:47 +02:00
UV_CACHE_DIR: /uv-cache
2025-06-21 16:33:44 +02:00
UV_LINK_MODE: copy
2025-06-20 19:03:22 +02:00
commands:
2025-06-21 16:30:39 +02:00
- uv sync
2025-06-24 11:14:41 +02:00
2025-06-26 15:40:30 +02:00
python_build:
2025-06-25 14:47:11 +02:00
image: code.philo.ydns.eu/philorg/uv
2025-06-21 17:56:31 +02:00
volumes:
- uv-cache:/uv-cache
environment:
UV_CACHE_DIR: /uv-cache
UV_LINK_MODE: copy
2025-06-21 14:52:59 +02:00
commands:
- uv build --wheel
2025-06-21 18:02:52 +02:00
- uv cache prune --ci
2025-06-24 13:30:19 +02:00
2025-06-26 15:40:30 +02:00
python_publish:
2025-06-25 14:47:11 +02:00
image: code.philo.ydns.eu/philorg/uv
2025-06-22 03:18:59 +02:00
environment:
OWNER: philorg
REGISTRY_URL: https://code.philo.ydns.eu
2025-06-24 13:25:32 +02:00
REGISTRY_TOKEN:
from_secret: registry_token
2025-06-22 03:18:59 +02:00
commands:
2025-06-24 13:31:47 +02:00
- uv publish --publish-url $REGISTRY_URL/api/packages/$OWNER/pypi --token $REGISTRY_TOKEN dist/*.whl
2025-06-24 10:57:18 +02:00
failure: ignore
2025-06-26 15:40:30 +02:00
container_build_publish:
image: quay.io/podman/stable:latest
# Caution: This image is built daily. It might fill up your image store quickly.
#pull: true
volumes:
- containers:/var/lib/containers
# Fill in the trusted checkbox in Woodpecker's settings as well
privileged: true
environment:
registry: code.philo.ydns.eu
org: philorg
container_name: test-woodpecker-python
registry_token:
from_secret: registry_token
commands:
# Login at the registry
- podman login -u __token__ --password $registry_token $registry
# Build the container image
- podman build --volume=/var/lib/containers:/var/lib/containers --tag $registry/$org/$container_name:latest --tag $registry/$org/$container_name:$CI_COMMIT_TAG .
# Push the image
- podman push $registry/$org/$container_name:latest
- podman push $registry/$org/$container_name:$CI_COMMIT_TAG