Skip to content

Commit 4f8abff

Browse files
committed
Update createproducts.yaml
1 parent f6124e8 commit 4f8abff

File tree

1 file changed

+32
-26
lines changed

1 file changed

+32
-26
lines changed

.github/workflows/createproducts.yaml

+32-26
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
11
name: Run Python script
22

33
on:
4-
workflow_dispatch:
4+
workflow_dispatch:
55

66
jobs:
7-
build:
8-
runs-on: ubuntu-latest
7+
build:
8+
runs-on: ubuntu-latest
9+
environment: apiMana
910

10-
steps:
11-
- uses: actions/checkout@v2
11+
steps:
12+
- uses: actions/checkout@v2
1213

13-
- name: Set up Python
14-
uses: actions/setup-python@v2
15-
with:
16-
python-version: '3.8'
14+
- name: Set up Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.8'
1718

18-
- name: Install dependencies
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install python-dotenv
22-
sudo apt-get update
23-
sudo apt-get install azure-cli
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install python-dotenv
23+
sudo apt-get update
24+
sudo apt-get install azure-cli
2425
25-
- name: Change to script directory and run Python script
26-
run: |
27-
cd python
28-
python products.py
29-
env:
30-
clientId: ${{ secrets.CLIENT_ID }}
31-
clientSecret: ${{ secrets.CLIENT_SECRET }}
32-
resourceGroupName: ${{ secrets.RESOURCE_GROUP_NAME }}
33-
apimServiceName: ${{ secrets.APIM_SERVICE_NAME }}
34-
tenantId: ${{ secrets.TENANT_ID }}
35-
subscriptionId: ${{ secrets.SUBSCRIPTION_ID }}
26+
- name: Azure Login
27+
uses: azure/login@v1
28+
with:
29+
creds: ${{ secrets.AZURE_CREDENTIALS }}
30+
31+
- name: Change to script directory and run Python script
32+
run: |
33+
cd python
34+
python products.py
35+
env:
36+
clientId: ${{ secrets.CLIENT_ID }}
37+
clientSecret: ${{ secrets.CLIENT_SECRET }}
38+
resourceGroupName: ${{ secrets.RESOURCE_GROUP_NAME }}
39+
apimServiceName: ${{ secrets.APIM_SERVICE_NAME }}
40+
tenantId: ${{ secrets.TENANT_ID }}
41+
subscriptionId: ${{ secrets.SUBSCRIPTION_ID }}
3642

0 commit comments

Comments
 (0)