2024-05-27 18:02:33 +02:00

37 lines
665 B
YAML

kind: pipeline
type: docker
name: default
steps:
- name: build
image: plugins/docker
settings:
dockerfile: Dockerfile
context: .
tags:
- latest
- ${DRONE_COMMIT_SHA}
- name: publish
image: plugins/docker
settings:
repo: your_dockerhub_username/your_image_name
tags:
- latest
- ${DRONE_COMMIT_SHA}
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event:
- push
branch:
- main
- master
# Define secrets for Docker Hub credentials
secrets:
- docker_username
- docker_password