Podman build container
All checks were successful
ci/woodpecker/tag/test Pipeline was successful
ci/woodpecker/tag/build Pipeline was successful

This commit is contained in:
phil 2025-06-26 15:40:30 +02:00
parent 04edafde2c
commit fe4e3428c0

View file

@ -6,21 +6,7 @@ depends_on:
- test
steps:
container_build_release_push:
#image: docker.io/maltegrosse/woodpecker-buildah:0.0.12
image: code.philo.ydns.eu/philorg/woodpecker-buildah
settings:
registry: code.philo.ydns.eu
repository: philorg/test-woodpecker-python
tags: ${CI_COMMIT_SHA} latest
architectures: amd64
context: Containerfile
username:
from_secret: registry_username
password:
from_secret: registry_password
sync:
python_sync:
image: code.philo.ydns.eu/philorg/uv
volumes:
- uv-cache:/uv-cache
@ -30,7 +16,7 @@ steps:
commands:
- uv sync
build:
python_build:
image: code.philo.ydns.eu/philorg/uv
volumes:
- uv-cache:/uv-cache
@ -41,7 +27,7 @@ steps:
- uv build --wheel
- uv cache prune --ci
push_python:
python_publish:
image: code.philo.ydns.eu/philorg/uv
environment:
OWNER: philorg
@ -51,3 +37,26 @@ steps:
commands:
- uv publish --publish-url $REGISTRY_URL/api/packages/$OWNER/pypi --token $REGISTRY_TOKEN dist/*.whl
failure: ignore
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