diff --git a/scripts/publish-image.sh b/scripts/publish-image.sh index b90c19c..d2d6f4e 100755 --- a/scripts/publish-image.sh +++ b/scripts/publish-image.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -image="registry.gitea.faerro.it/andrea/faerro-kb" +domain="registry.gitea.faerro.it" +image="$domain/andrea/faerro-kb" repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" bump="patch" @@ -102,7 +103,7 @@ if [[ -n "$registry_username" || -n "$registry_token" ]]; then echo "Set both GITEA_USERNAME and GITEA_TOKEN in .env to log in automatically." >&2 exit 1 fi - if ! printf '%s' "$registry_token" | docker login --username "$registry_username" --password-stdin gitea.faerro.it; then + if ! printf '%s' "$registry_token" | docker login --username "$registry_username" --password-stdin "$domain"; then unset registry_token exit 1 fi