Files
harbormaster-client/.woodpecker/.deploy-from-registry.yml
2025-12-17 21:06:58 -06:00

42 lines
1.2 KiB
YAML

steps:
build-and-push:
image: woodpeckerci/plugin-docker-buildx:5.1
settings:
username:
from_secret: REGISTRY_USERNAME
password:
from_secret: REGISTRY_PASSWORD
registry: registry.binderlab.io
repo: registry.binderlab.io/harbormaster-client
tags: latest
dockerfile: docker/Dockerfile
context: .
push: true
when:
event: push
branch:
- main
not:
event: manual
pull-container:
image: docker:cli
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
REGISTRY_USERNAME:
from_secret: REGISTRY_USERNAME
REGISTRY_PASSWORD:
from_secret: REGISTRY_PASSWORD
DEPLOY_PATH:
from_secret: DEPLOY_PATH
commands:
- echo "$REGISTRY_PASSWORD" | docker login registry.binderlab.io --username "$REGISTRY_USERNAME" --password-stdin
- docker pull registry.binderlab.io/harbormaster-client:latest
- docker create --name temp-harbormaster-client registry.binderlab.io/harbormaster-client:latest
- pwd
- docker cp temp-harbormaster-client:/app $DEPLOY_PATH/harbormaster-client
- docker rm temp-harbormaster-client
when:
event: manual