From 8f4ad5b421786abbbb554fb7dc0d7851978eb6c9 Mon Sep 17 00:00:00 2001 From: khwezi Date: Sun, 8 Mar 2026 11:34:28 +0200 Subject: [PATCH] Added docker login step --- .drone.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 002963b..eec07f4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,7 +7,7 @@ clone: disable: true steps: - - name: manual-clone + - name: clone image: alpine/git commands: - git clone https://gitea.khongisa.co.za/MngomaLab/webapitest.git . @@ -18,6 +18,17 @@ steps: commands: - dotnet publish --configuration Release - ls ./SampleApi/bin/Release/net8.0/publish/ + + - name: docker login + image: docker:20.10 + environment: + DOCKER_USERNAME: + from_secret: docker_username + DOCKER_PASSWORD: + from_secret: docker_password + commands: + - echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin + - docker info | grep "Registry" - name: docker build and push image: plugins/docker @@ -30,6 +41,7 @@ steps: from_secret: docker_password dockerfile: Dockerfile context: . + force_tag: true tags: - latest - ${DRONE_BUILD_NUMBER} \ No newline at end of file