Fix get email, remove versions from deploy script

This commit is contained in:
Christian Cueni 2022-08-16 08:00:05 +02:00
parent 67b8aa9f8d
commit 3280fc44fa
2 changed files with 3 additions and 4 deletions

View File

@ -13,10 +13,9 @@ set -ev
npm run build
# create and push new docker container
docker buildx build --platform=linux/amd64 -f compose/django/Dockerfile -t "$TAG" -t "$LATEST" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" .
# docker buildx build --platform=linux/amd64 -f compose/django/Dockerfile -t "$TAG" -t "$LATEST" --build-arg VERSION="$VERSION" --build-arg BUILD_TIMESTAMP="$BUILD_TIMESTAMP" .
docker buildx build --platform=linux/amd64 -f compose/django/Dockerfile .
docker push iterativ/vbv-lernwelt-django
docker push "$TAG"
docker push "$LATEST"
# deploy to caprover
caprover deploy -h https://captain.control.iterativ.ch -a vbv-lernwelt -i docker.io/iterativ/vbv-lernwelt-django

View File

@ -46,5 +46,5 @@ def _user_data_from_token_data(token: dict) -> dict:
"first_name": token.get("given_name", ""),
"last_name": token.get("family_name", ""),
"username": token.get("preferred_username", ""),
"email": token.get("emails", [])[""],
"email": token.get("emails", [''])[0],
}