weather_api/.drone.yml
Argiris Deligiannidis 933a650bdb
All checks were successful
continuous-integration/drone/push Build is passing
Update .drone.yml
2024-04-07 10:15:35 +00:00

30 lines
835 B
YAML

kind: pipeline
type: docker
name: default
steps:
- name: container-build
image: 'docker:dind'
environment:
USERNAME:
from_secret: docker_username
PASSWORD:
from_secret: docker_password
volumes:
- name: dockersock
path: /var/run/docker.sock
commands:
- >-
if [ "${DRONE_BRANCH}" = "main" ]; then export
BUILD_TAG="latest"; else export BUILD_TAG="${DRONE_BRANCH}"; fi;
- docker login -u $USERNAME -p $PASSWORD git.argideli.com
- >-
docker build -t
git.argideli.com/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}:$BUILD_TAG
.
- >-
docker push
git.argideli.com/${DRONE_REPO_NAMESPACE}/${DRONE_REPO_NAME}:$BUILD_TAG
volumes:
- name: dockersock
host:
path: /var/run/docker.sock