CI: add Docker authentication on image build

This commit is contained in:
Oleg Kalachev
2021-05-26 23:43:52 +03:00
parent a3aecc6d3a
commit 856e94aafa

View File

@@ -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