Skip to content

Commit 7fb99c8

Browse files
committed
Remove the dotenv
use github to hold var
1 parent 4f8abff commit 7fb99c8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/createproducts.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,6 @@ jobs:
3939
apimServiceName: ${{ secrets.APIM_SERVICE_NAME }}
4040
tenantId: ${{ secrets.TENANT_ID }}
4141
subscriptionId: ${{ secrets.SUBSCRIPTION_ID }}
42+
product_id: ${{ secrets.PRODUCT_ID }}
43+
product_name: ${{ secrets.PRODUCT_NAME }}
4244

python/products.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import os
22
import subprocess
33
from os import getenv
4-
from dotenv import load_dotenv
5-
6-
# Load the .env file
7-
load_dotenv('python/.env')
84

5+
# Import the getenv function from the os module
96
# Get environment variables
107
clientId = os.getenv('clientId')
118
clientSecret = os.getenv('clientSecret')
@@ -15,8 +12,8 @@
1512
subscriptionId = os.getenv('subscriptionId')
1613

1714
# Define product_id and product_name directly in the code
18-
product_id = 'GithubProduct'
19-
product_name = 'Github Product'
15+
product_id = os.getenv('product_id')
16+
product_name = os.getenv('product_name')
2017

2118
# Print the environment variables to debug
2219
print(f"clientId: {clientId}")

0 commit comments

Comments
 (0)