Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#58 ignore stryke
  • Loading branch information
enriquezrene committed Apr 12, 2020
commit a8ad6c40cb2b6d024e736bf2817443af6b9842d7
10 changes: 1 addition & 9 deletions .github/workflows/CD-time-tracker-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,11 @@ jobs:
node-version: '12.x'

- name: Inject Secrets
shell: python
env:
SCOPES: ${{ secrets.scopes }}
CLIENT_ID: ${{ secrets.client_id }}
AUTHORITY: ${{ secrets.authority }}
BASE_PATH: "src/environments/"
run: |
import os
base_path = os.environ.get('BASE_PATH', 'src/environments/')
with open(base_path + "keys.ts", "w") as fileWithKeys:
fileWithKeys.write('export const AUTHORITY = ') + str(os.environ['SCOPES']).split(",") + ';';
fileWithKeys.write('\nexport const CLIENT_ID = ' + os.environ['CLIENT_ID']) + ';';
fileWithKeys.write('\nexport const SCOPES = ' + os.environ['AUTHORITY']) + ';';
run: sudo sh scripts/populate-keys.sh

- name: 'run: npm install and build'
run: |
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/CI-time-tracker-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,11 @@ jobs:
run: npm install

- name: Inject Secrets
shell: python
env:
SCOPES: ${{ secrets.scopes }}
CLIENT_ID: ${{ secrets.client_id }}
AUTHORITY: ${{ secrets.authority }}
BASE_PATH: "src/environments/"
run: |
import os
base_path = os.environ.get('BASE_PATH', 'src/environments/')
with open(base_path + "keys.ts", "w") as fileWithKeys:
scopes = str(os.environ['SCOPES']).split(",")
client_id = os.environ['CLIENT_ID']
authority = os.environ['AUTHORITY']
fileWithKeys.write(f'export const SCOPES = {scopes};')
fileWithKeys.write(f'\nexport const CLIENT_ID = {client_id};')
fileWithKeys.write(f'\nexport const AUTHORITY = {authority};')
run: sudo sh scripts/populate-keys.sh

- name: Run the test
run: npm run ci-test --if-present
Expand Down