Skip to content

Commit

Permalink
ci: fix test_docker.sh failing due to missing .env (#12873)
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu authored Jan 29, 2025
1 parent 764b211 commit e6c54b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/test_docker.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
#!/bin/bash
set -e -x -o pipefail
hash=$(git rev-parse HEAD || openssl rand -base64 36)

export PG_PASS=$(openssl rand -base64 36 | tr -d '\n')
export AUTHENTIK_SECRET_KEY=$(openssl rand -base64 60 | tr -d '\n')
export AUTHENTIK_IMAGE="xghcr.io/goauthentik/server"
export AUTHENTIK_TAG=$(git rev-parse HEAD | cut -c1-15)
export AUTHENTIK_TAG=$(echo $hash | cut -c1-15)
export COMPOSE_PROJECT_NAME="authentik-test-${AUTHENTIK_TAG}"

# Ensure buildx is installed
docker buildx install
# For release builds we have an empty client here as we use the NPM package
mkdir -p ./gen-ts-api
touch .env

docker build -t ${AUTHENTIK_IMAGE}:${AUTHENTIK_TAG} .
docker compose up --no-start
docker compose start postgresql redis
Expand Down

0 comments on commit e6c54b3

Please sign in to comment.