From f4aa094a2380077f2053ccf1731afc9e0a11971b Mon Sep 17 00:00:00 2001 From: khwezi Date: Sun, 8 Mar 2026 11:29:11 +0200 Subject: [PATCH 1/2] Refactored target repo --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 14fb4d2..002963b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,7 +22,7 @@ steps: - name: docker build and push image: plugins/docker settings: - repo: khwezi/mngomalab + repo: khwezi/webapitest registry: index.docker.io username: from_secret: docker_username @@ -32,4 +32,4 @@ steps: context: . tags: - latest - #- ${DRONE_BUILD_NUMBER} \ No newline at end of file + - ${DRONE_BUILD_NUMBER} \ No newline at end of file -- 2.47.3 From 8f4ad5b421786abbbb554fb7dc0d7851978eb6c9 Mon Sep 17 00:00:00 2001 From: khwezi Date: Sun, 8 Mar 2026 11:34:28 +0200 Subject: [PATCH 2/2] 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 -- 2.47.3