nginx-php/.drone.yml
Piotr Biernat 4ab2cb28f6
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
[fix] Fixed image building config.
[add] Drone CI build and publish processes.
2021-11-22 21:03:20 +01:00

46 lines
811 B
YAML

---
kind: pipeline
type: docker
name: Build
steps:
- name: build
image: plugins/docker
commands:
- sleep 5
- docker build -t docker.pbiernat.dev/nginx-php .
- docker images | grep nginx-php
volumes:
- name: docker-sock
path: /var/run
- name: publish
image: plugins/docker
environment:
DOCKER_USERNAME:
from_secret: registry_username
DOCKER_PASSWORD:
from_secret: registry_password
commands:
- sleep 5
- docker login docker.pbiernat.dev -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker push docker.pbiernat.dev/nginx-php
when:
branch: master
volumes:
- name: docker-sock
path: /var/run
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: docker-sock
path: /var/run
volumes:
- name: docker-sock
temp: {}