File tree Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Expand file tree Collapse file tree 2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -25,19 +25,11 @@ jobs:
25
25
node-version : ' 12.x'
26
26
27
27
- name : Inject Secrets
28
- shell : python
29
28
env :
30
29
SCOPES : ${{ secrets.scopes }}
31
30
CLIENT_ID : ${{ secrets.client_id }}
32
31
AUTHORITY : ${{ secrets.authority }}
33
- BASE_PATH : " src/environments/"
34
- run : |
35
- import os
36
- base_path = os.environ.get('BASE_PATH', 'src/environments/')
37
- with open(base_path + "keys.ts", "w") as fileWithKeys:
38
- fileWithKeys.write('export const AUTHORITY = ') + str(os.environ['SCOPES']).split(",") + ';';
39
- fileWithKeys.write('\nexport const CLIENT_ID = ' + os.environ['CLIENT_ID']) + ';';
40
- fileWithKeys.write('\nexport const SCOPES = ' + os.environ['AUTHORITY']) + ';';
32
+ run : sudo sh scripts/populate-keys.sh
41
33
42
34
- name : ' run: npm install and build'
43
35
run : |
Original file line number Diff line number Diff line change @@ -40,22 +40,11 @@ jobs:
40
40
run : npm install
41
41
42
42
- name : Inject Secrets
43
- shell : python
44
43
env :
45
44
SCOPES : ${{ secrets.scopes }}
46
45
CLIENT_ID : ${{ secrets.client_id }}
47
46
AUTHORITY : ${{ secrets.authority }}
48
- BASE_PATH : " src/environments/"
49
- run : |
50
- import os
51
- base_path = os.environ.get('BASE_PATH', 'src/environments/')
52
- with open(base_path + "keys.ts", "w") as fileWithKeys:
53
- scopes = str(os.environ['SCOPES']).split(",")
54
- client_id = os.environ['CLIENT_ID']
55
- authority = os.environ['AUTHORITY']
56
- fileWithKeys.write(f'export const SCOPES = {scopes};')
57
- fileWithKeys.write(f'\nexport const CLIENT_ID = {client_id};')
58
- fileWithKeys.write(f'\nexport const AUTHORITY = {authority};')
47
+ run : sudo sh scripts/populate-keys.sh
59
48
60
49
- name : Run the test
61
50
run : npm run ci-test --if-present
You can’t perform that action at this time.
0 commit comments