diff --git a/.drone.yml b/.drone.yml index 939ff15..1c6f41e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,22 +18,18 @@ steps: - hadolint --version - hadolint Dockerfile - # Bauen, taggen und pushen - - name: docker_build_and_push_master - image: plugins/docker - settings: + - name: container + image: docker:20 + environment: username: from_secret: OCI_REGISTRY_USER password: from_secret: OCI_REGISTRY_PASS - dockerfile: Dockerfile - repo: registry.mgrote.net/allzweckcontainer - registry: registry.mgrote.net - debug: true - tags: - - latest - - ${DRONE_COMMIT_SHA:0:8} - - ${DRONE_COMMIT_BRANCH} - event: - exclude: - - pull_request + commands: + - docker build -t registry.mgrote.net/allzweckcontainer:latest . + - docker tag registry.mgrote.net/allzweckcontainer:latest registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_SHA:0:8} + - docker tag registry.mgrote.net/allzweckcontainer:latest registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_BRANCH} + - docker login --username $username --password $password registry.mgrote.net + - docker push registry.mgrote.net/allzweckcontainer:latest + - docker push registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_SHA:0:8} + - docker push registry.mgrote.net/allzweckcontainer:${DRONE_COMMIT_BRANCH}