File tree Expand file tree Collapse file tree 2 files changed +4
-20
lines changed
Expand file tree Collapse file tree 2 files changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -24,28 +24,12 @@ jobs:
2424 run : npm install
2525
2626 - name : Inject Secrets
27- shell : python
2827 env :
2928 SCOPES : ${{ secrets.scopes }}
3029 CLIENT_ID : ${{ secrets.client_id }}
3130 AUTHORITY : ${{ secrets.authority }}
32- BASE_PATH : " src/environments/"
3331 run : |
34- import os
35- base_path = os.environ.get('BASE_PATH', 'src/environments/')
36- with open(base_path + "keys.ts", "w") as fileWithKeys:
37- scopes = str(os.environ['SCOPES'])
38- export_scopes = f'export const SCOPES = ["{scopes}"];'
39- print(export_scopes)
40- client_id = os.environ['CLIENT_ID']
41- export_client_id = f'export const CLIENT_ID = "{client_id}";\n'
42- print(export_client_id)
43- authority = os.environ['AUTHORITY']
44- export_authority = f'export const AUTHORITY = "{authority}";\n'
45- print(export_authority)
46- fileWithKeys.write(export_scopes)
47- fileWithKeys.write(export_authority)
48- fileWithKeys.write(export_client_id)
32+ > src/environments/keys.ts && echo 'export const AUTHORITY = "'$AUTHORITY'";' >> src/environments/keys.ts && echo 'export const CLIENT_ID = "'$CLIENT_ID'";' >> src/environments/keys.ts && echo 'export const SCOPES = ["'$SCOPES'"];' >> src/environments/keys.ts
4933
5034 - name : Run the test
5135 run : npm run ci-test --if-present
Original file line number Diff line number Diff line change 1- export const AUTHORITY = 'XXX ' ;
2- export const CLIENT_ID = 'XXX ' ;
3- export const SCOPES = [ 'XXX ' ] ;
1+ export const AUTHORITY = 'ABC ' ;
2+ export const CLIENT_ID = 'XYZ ' ;
3+ export const SCOPES = [ 'ABC ' ] ;
You can’t perform that action at this time.
0 commit comments