kind: pipeline type: docker name: default steps: - name: build image: plugins/docker settings: dockerfile: Dockerfile context: . tags: - ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:${DRONE_COMMIT_SHA} - ${DRONE_REPO_OWNER}/${DRONE_REPO_NAME}:latest - name: publish image: plugins/docker settings: repo: ${DRONE_REPO_OWNER}/${DRONE_REPO_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