From 296a36a3a5ccc30f5c742d40ebd3c8b6a1afd3f7 Mon Sep 17 00:00:00 2001 From: Rajpal Chauhan Date: Thu, 8 Feb 2024 03:32:05 -0800 Subject: [PATCH] test Signed-off-by: Rajpal Chauhan --- .github/workflows/main.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a229f654..2b8a2612 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -136,8 +136,10 @@ jobs: - name: Update Docker base image and pull the base image if access is required if: matrix.BASE_SOURCE_IMAGE_REGISTRY != '' && contains(fromJSON('["aries-endorser-db","aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy"]'), matrix.service) - run: - docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD $BASE_SOURCE_IMAGE_REGISTRY + run: | + if [[ -n "${REGISTRY_USERNAME}" ]]; then + docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD $BASE_SOURCE_IMAGE_REGISTRY + fi BASE_IMAGE="${BASE_SOURCE_IMAGE_REGISTRY}${BASE_SOURCE_IMAGE_NAME}:${BASE_SOURCE_IMAGE_TAG}" sed -i -e "s;FROM .*;FROM ${BASE_IMAGE};g" "$file" docker pull $BASE_IMAGE