From f82f10596cc4770b9833c90c029b92f4a04b5cd6 Mon Sep 17 00:00:00 2001 From: teutat3s <10206665+teutat3s@users.noreply.github.com> Date: Mon, 27 Feb 2023 20:38:04 +0100 Subject: [PATCH] ci: fix docker login using --password-stdin --- .drone.yml | 7 ++++--- deploy.sh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1303ca6..49a6dea 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,8 +36,10 @@ steps: - name: deploy image: registry.greenbaum.cloud/library/triton-docker environment: - DOCKER_CONFIG: - from_secret: docker_config + DOCKER_USERNAME: + from_secret: docker_username + DOCKER_PASSWORD: + from_secret: docker_password TRITON_SSH_KEY: from_secret: triton_ssh_key TRITON_ACCOUNT: @@ -48,7 +50,6 @@ steps: commands: - mkdir -p $HOME/.ssh $HOME/.docker - echo -e "$TRITON_SSH_KEY" > $HOME/.ssh/id_rsa - - echo -e "$DOCKER_CONFIG" > $HOME/.docker/config.json - /usr/local/bin/docker-entrypoint.sh ./deploy.sh $DRONE_TAG trigger: diff --git a/deploy.sh b/deploy.sh index 1fad349..a1962a9 100755 --- a/deploy.sh +++ b/deploy.sh @@ -17,7 +17,7 @@ if [[ -z "$TAG" ]]; then fi # Login to Greenbaum's private docker registry -docker login registry.greenbaum.cloud +echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin registry.greenbaum.cloud # Use our tag for docker-compose export DEPLOY_TAG="$TAG"