Skip to content

Commit 8295e35

Browse files
committed
Add heredoc .env file in Build and Test Action workflow
1 parent 3e00732 commit 8295e35

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/build-and-test.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,26 @@ jobs:
8888
- name: Build Upstash mock image
8989
run: docker buildx build --load -t wb/upstash-redis-local:test test/containers/upstash/local-proxy
9090

91+
- name: Generate container env file
92+
shell: bash
93+
run: |
94+
set -euo pipefail
95+
mkdir -p test/containers
96+
: "${SUPABASE_SERVICE_ROLE_KEY:?SUPABASE_SERVICE_ROLE_KEY secret is required}"
97+
98+
cat <<EOF > test/containers/.env
99+
COMPOSE_PROJECT_NAME=wb-e2e
100+
CONVERTKIT_HTTP_PORT=9010
101+
RESEND_HTTP_PORT=9011
102+
UPSTASH_HTTP_PORT=${UPSTASH_HTTP_PORT:-8079}
103+
UPSTASH_REDIS_PORT=${UPSTASH_REDIS_PORT:-6380}
104+
UPSTASH_TOKEN=${UPSTASH_TOKEN:-local-dev-token}
105+
SUPABASE_PROJECT_NAME=wb-supabase
106+
SUPABASE_HEALTH_TIMEOUT=${SUPABASE_HEALTH_TIMEOUT:-240}
107+
SUPABASE_URL=${SUPABASE_URL:-http://127.0.0.1:54321}
108+
SUPABASE_SERVICE_ROLE_KEY=${SUPABASE_SERVICE_ROLE_KEY}
109+
EOF
110+
91111
- name: Start mock containers
92112
run: npm run containers:up
93113

0 commit comments

Comments
 (0)