Skip to content

Commit f38d08c

Browse files
committed
set environment variables
1 parent ec3ade5 commit f38d08c

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/test-upload-local.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
env:
1818
COMPOSE_FILE: ./docker-compose.yml
1919
REGISTRY_PREFIX: docker.io/library
20+
SERVER_NAME: localhost
2021

2122
steps:
2223
- uses: actions/checkout@v4
@@ -53,6 +54,14 @@ jobs:
5354
restore-keys: |
5455
docker-local-images-
5556
57+
- name: Setup environment
58+
run: |
59+
# copy the example.env to .env
60+
cp example.env .env
61+
62+
# Update .env to use the hostname
63+
sed -i "s/SERVER_NAME=.*/SERVER_NAME=localhost/" .env
64+
5665
- name: Build or load images
5766
run: |
5867
if [ -f mongo.tar ]; then

.github/workflows/test-upload-nginx.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
env:
1818
COMPOSE_FILE: ./docker-compose-nginx.yml
1919
REGISTRY_PREFIX: docker.io/library
20+
SERVER_NAME: localhost
21+
BRAINLIFE_USE_NGINX: "true"
2022

2123
steps:
2224
- uses: actions/checkout@v4
@@ -63,6 +65,15 @@ jobs:
6365
restore-keys: |
6466
docker-nginx-images-
6567
68+
- name: Setup environment
69+
run: |
70+
# copy the example.env to .env
71+
cp example.env .env
72+
73+
# Update .env to use the hostname
74+
sed -i "s/SERVER_NAME=.*/SERVER_NAME=localhost/" .env
75+
sed -i "s/BRAINLIFE_USE_NGINX=.*/BRAINLIFE_USE_NGINX=true/" .env
76+
6677
- name: Build or load base images
6778
run: |
6879
if [ -f mongo.tar ]; then
@@ -102,13 +113,6 @@ jobs:
102113
run: |
103114
# create self signed certs using the hostname
104115
./create_self_signed_certs.sh localhost
105-
106-
# copy the example.env to .env
107-
cp example.env .env
108-
109-
# Update .env to use the hostname
110-
sed -i "s/SERVER_NAME=.*/SERVER_NAME=localhost" .env
111-
sed -i "s/BRAINLIFE_USE_NGINX=.*/BRAINLIFE_USE_NGINX=true/" .env
112116
113117
- name: Start services
114118
run: |

0 commit comments

Comments
 (0)