File tree 3 files changed +12
-0
lines changed
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 45
45
-
46
46
name : Generate AUTH_SECRET
47
47
run : echo "AUTH_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV
48
+ # https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser
49
+ -
50
+ name : Generate NEXT_PUBLIC_OIDC_SERVER_URL
51
+ run : |
52
+ if [ "${{ github.event_name }}" == "push" ]; then
53
+ echo "NEXT_PUBLIC_OIDC_SERVER_URL=https://demo.api-platform.com/oidc/realms/demo" >> $GITHUB_ENV
54
+ else
55
+ echo "NEXT_PUBLIC_OIDC_SERVER_URL=https://pr-${{ github.event.pull_request.number }}-demo.api-platform.com/oidc/realms/demo" >> $GITHUB_ENV
56
+ fi
48
57
-
49
58
name : Build Docker images
50
59
uses : docker/bake-action@v5
Original file line number Diff line number Diff line change @@ -106,6 +106,8 @@ jobs:
106
106
POSTGRES_PASSWORD : aae5bf316ef5fe87ad806c6a9240fff68bcfdaf7
107
107
KEYCLOAK_POSTGRES_PASSWORD : 26d7f630f1524eb210bbf496443f2038a9316e9e
108
108
KEYCLOAK_ADMIN_PASSWORD : 2f31e2fad93941b818449fd8d57fd019b6ce7fa5
109
+ # https://nextjs.org/docs/app/building-your-application/configuring/environment-variables#bundling-environment-variables-for-the-browser
110
+ NEXT_PUBLIC_OIDC_SERVER_URL : https://localhost/oidc/realms/demo
109
111
# https://docs.docker.com/compose/environment-variables/envvars/#compose_file
110
112
COMPOSE_FILE : compose.yaml:compose.prod.yaml:compose.e2e.yaml
111
113
steps :
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ services:
18
18
target : prod
19
19
args :
20
20
AUTH_SECRET : ${AUTH_SECRET}
21
+ NEXT_PUBLIC_OIDC_SERVER_URL : ${NEXT_PUBLIC_OIDC_SERVER_URL}
21
22
environment :
22
23
AUTH_SECRET : ${AUTH_SECRET}
23
24
You can’t perform that action at this time.
0 commit comments