Skip to content

Commit 81c54dc

Browse files
committed
Fix Github Actions + .env.sample
1 parent 7e45ea2 commit 81c54dc

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ DB_PASS = ''
77
FRONTEND_URL = 'http://localhost:3000'
88
SECRET_KEY = ""
99
DEFAULT_BLOCK_LANG = 1
10-
SLIDERFILESPATH = 'upload/sliderImg/'
10+
SLIDERFILESPATH = 'upload/sliderImg/'

.github/workflows/ci.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,19 @@ jobs:
4545

4646
- name: Setup environment
4747
run: |
48-
cp .env.sample .env
49-
echo "DB_DRIVER=mysql" >> .env
50-
echo "DB_HOST=127.0.0.1" >> .env
51-
echo "DB_NAME=test_db" >> .env
52-
echo "DB_USER=root" >> .env
53-
echo "DB_PASS=root" >> .env
54-
echo "SECRET_KEY=test_secret_key_for_ci_$(openssl rand -hex 32)" >> .env
55-
echo "DEBUG=true" >> .env
56-
echo "FRONTEND_URL=http://localhost:3000" >> .env
57-
echo "DEFAULT_BLOCK_LANG=1" >> .env
58-
echo "SLIDERFILESPATH=upload/sliderImg/" >> .env
48+
CI_SECRET="test_secret_key_for_ci_$(openssl rand -hex 32)"
49+
{
50+
echo "DEBUG=true"
51+
echo "DB_DRIVER=mysql"
52+
echo "DB_HOST=127.0.0.1"
53+
echo "DB_NAME=test_db"
54+
echo "DB_USER=root"
55+
echo "DB_PASS=root"
56+
echo "FRONTEND_URL=http://localhost:3000"
57+
echo "SECRET_KEY=$CI_SECRET"
58+
echo "DEFAULT_BLOCK_LANG=1"
59+
echo "SLIDERFILESPATH=upload/sliderImg/"
60+
} > .env
5961
6062
- name: Wait for MySQL
6163
run: |

0 commit comments

Comments
 (0)