Skip to content

Commit 1558588

Browse files
ci: [TT-412] adds other attempt to use secrets as env var
1 parent 75ef7a9 commit 1558588

File tree

1 file changed

+32
-36
lines changed

1 file changed

+32
-36
lines changed

.github/workflows/time-tracker-v1-workflow.yml

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,41 @@ on:
88

99
jobs:
1010
time-tracker-ci:
11-
1211
runs-on: ubuntu-latest
1312

1413
strategy:
1514
matrix:
1615
python-version: [3.9]
17-
16+
1817
steps:
19-
- name: Checking out code from the repository
20-
uses: actions/checkout@v2
21-
22-
- name: Setting up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
27-
- name: Install dependencies
28-
run: |
29-
python -m pip install --upgrade pip
30-
pip install -r requirements/time_tracker_api/dev.txt
31-
pip install -r requirements/time_tracker_events/dev.txt
32-
33-
- name: Login to azure
34-
uses: Azure/login@v1
35-
with:
36-
creds: ${{ secrets.AZURE_CREDENTIALS }}
37-
38-
- name: Get vault from azure
39-
uses: Azure/get-keyvault-secrets@v1
40-
with:
41-
keyvault: "time-tracker-secrets"
42-
secrets: 'MS-CLIENT-ID'
43-
id: timeTrackerAzureVault
44-
45-
- name: Inject secrets
46-
env:
47-
MS_CLIENT_ID: ${{ steps.timeTrackerAzureVault.outputs.MS-CLIENT-ID }}
48-
49-
- name: Run tests
50-
run: |
51-
echo $MS_CLIENT_ID
52-
pytest tests
18+
- name: Checking out code from the repository
19+
uses: actions/checkout@v2
20+
21+
- name: Setting up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r requirements/time_tracker_api/dev.txt
30+
pip install -r requirements/time_tracker_events/dev.txt
31+
32+
- name: Login to azure
33+
uses: Azure/login@v1
34+
with:
35+
creds: ${{ secrets.AZURE_CREDENTIALS }}
36+
37+
- name: Get vault from azure
38+
uses: Azure/get-keyvault-secrets@v1
39+
with:
40+
keyvault: "time-tracker-secrets"
41+
secrets: "MS-CLIENT-ID"
42+
id: timeTrackerAzureVault
43+
44+
- name: Run tests
45+
env:
46+
MS_CLIENT_ID: ${{ steps.timeTrackerAzureVault.outputs.MS-CLIENT-ID }}
47+
run: |
48+
pytest tests

0 commit comments

Comments
 (0)