Skip to content

Commit

Permalink
fix GitHub ?
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Garcia Ordonez committed Aug 28, 2024
1 parent cc4f7e5 commit 3e605e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/dockerhub_login.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ fi

# check script needed variables
if [ ! -v OWNER ]; then
echo "## ERROR: incorrect usage of CI. OWNER (e.g. dockerhub organization like {{ cookiecutter.default_docker_registry }} or user private name) not defined!"
echo "## ERROR: incorrect usage of CI. OWNER (e.g. dockerhub organization like itisfoundation or user private name) not defined!"
exit 1
fi

# only upstream is allowed to push to {{ cookiecutter.default_docker_registry }} repo
if [ "${OWNER,,}" != "{{ cookiecutter.default_docker_registry }}" ] &&\
{ [ ! -v DOCKER_REGISTRY ] || [ -z "${DOCKER_REGISTRY}" ] || [ "$DOCKER_REGISTRY" = "{{ cookiecutter.default_docker_registry }}" ]; }; then
# only upstream is allowed to push to itisfoundation repo
if [ "${OWNER,,}" != "itisfoundation" ] &&\
{ [ ! -v DOCKER_REGISTRY ] || [ -z "${DOCKER_REGISTRY}" ] || [ "$DOCKER_REGISTRY" = "itisfoundation" ]; }; then
echo "## ERROR: it is not allowed to push to the main dockerhub repository from a fork!"
echo "## Please adapt your CI-defined environs (DOCKER_USERNAME, DOCKER_PASSWORD, DOCKER_REGISTRY)"
exit 1
Expand Down

0 comments on commit 3e605e9

Please sign in to comment.