File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 2424 with :
2525 node-version : ' 12.x'
2626
27+ - name : Inject Secrets
28+ shell : python
29+ env :
30+ SCOPES : ${{ secrets.scopes }}
31+ CLIENT_ID : ${{ secrets.client_id }}
32+ AUTHORITY : ${{ secrets.authority }}
33+ BASE_PATH : " src/environments/"
34+ run : |
35+ import os
36+ import json
37+ data = {}
38+ base_path = os.environ.get('BASE_PATH', 'src/environments/')
39+ with open(base_path + "keys.example.json", "r+") as jsonFileRead:
40+ data = json.load(jsonFileRead)
41+ data["scopes"] = str(os.environ['SCOPES']).split(",")
42+ data["client_id"] = os.environ['CLIENT_ID']
43+ data["authority"] = os.environ['AUTHORITY']
44+ with open(base_path + ".keys.json", "w+") as jsonFileWrite:
45+ json.dump(data, jsonFileWrite)
46+
2747 - name : ' run: npm install and build'
2848 run : |
2949 npm install
Original file line number Diff line number Diff line change 3939 - name : Install dependencies
4040 run : npm install
4141
42+ - name : Inject Secrets
43+ shell : python
44+ env :
45+ SCOPES : ${{ secrets.scopes }}
46+ CLIENT_ID : ${{ secrets.client_id }}
47+ AUTHORITY : ${{ secrets.authority }}
48+ BASE_PATH : " src/environments/"
49+ run : |
50+ import os
51+ import json
52+ data = {}
53+ base_path = os.environ.get('BASE_PATH', 'src/environments/')
54+ with open(base_path + "keys.example.json", "r+") as jsonFileRead:
55+ data = json.load(jsonFileRead)
56+ data["scopes"] = str(os.environ['SCOPES']).split(",")
57+ data["client_id"] = os.environ['CLIENT_ID']
58+ data["authority"] = os.environ['AUTHORITY']
59+ with open(base_path + ".keys.json", "w+") as jsonFileWrite:
60+ json.dump(data, jsonFileWrite)
61+
4262 - name : Run the test
4363 run : npm run ci-test --if-present
You can’t perform that action at this time.
0 commit comments