jdk21-builder/.woodpecker/publish.yaml
2025-08-10 18:24:19 +02:00

36 lines
880 B
YAML

when:
- event: tag
clone:
- name: git
image: woodpeckerci/plugin-git
settings:
partial: false
tags: true
depth: 0
steps:
- name: publish
image: quay.io/podman/stable
environment:
REGISTRY: registry.mnl.de
REGISTRY_USER: mnl
REGISTRY_TOKEN:
from_secret: REGISTRY_TOKEN
commands:
# Because we run this as user 1000 to make podman work:
- git config --global --add safe.directory $(pwd)
- export IMAGE_TAG=$(git describe --tags)
- echo $IMAGE_TAG
- export IMAGE_REF="$REGISTRY/$REGISTRY_USER/jdk21-builder:$IMAGE_TAG"
- echo $REGISTRY_TOKEN | podman login -u $REGISTRY_USER --password-stdin $REGISTRY
- echo Building image $IMAGE_REF
- podman build -t $IMAGE_REF .
- podman push $IMAGE_REF
backend_options:
kubernetes:
securityContext:
privileged: true
runAsUser: 1000
runAsGroup: 1000