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