From 856e94aafa5a752f99fff667c5900970ec416211 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 26 May 2021 23:43:52 +0300 Subject: [PATCH] CI: add Docker authentication on image build --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 540ca632..af9ea7f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,9 @@ jobs: directories: - imgcache before_script: + - if [ -z "$DOCKER_USERNAME" ] + echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + fi - docker pull ${DOCKER} # Check if there are any cached images, copy them to our "images" directory - if [ -n "$(ls -A imgcache/*.zip)" ]; then mkdir -p images && cp imgcache/*.zip images; fi