Files
first-test/.drone.yml
Patrick Gniza c245dcf8ce
Some checks failed
continuous-integration/drone/push Build is failing
test6
2025-11-04 20:50:05 +01:00

31 lines
777 B
YAML

kind: pipeline
type: docker
name: docker-build-and-push
steps:
- name: build-and-push
image: docker:26
privileged: true
environment:
REGISTRY_URL:
from_secret: REGISTRY_URL
DOCKER_USER:
from_secret: DOCKER_USER
DOCKER_PASS:
from_secret: DOCKER_PASS
volumes:
- name: docker_sock
path: /var/run/docker.sock
commands:
- echo "Logging in to Docker registry..."
- docker login $REGISTRY_URL -u "$DOCKER_USER" -p "$DOCKER_PASS"
- echo "Building image..."
- docker build -t $REGISTRY_URL/public/drone-test:latest .
- echo "Pushing image..."
- docker push $REGISTRY_URL/public/drone-test:latest
volumes:
- name: docker_sock
host:
path: /var/run/docker.sock