Skip to content

Commit

Permalink
Add environment variables for Azure OpenAI
Browse files Browse the repository at this point in the history
Replaced secrets with environment variables for AZURE_OPENAI_ENDPOINT_URL and AZURE_OPENAI_DEPLOYMENT_NAME in both publish_to_nuget and dotnet workflows. The reason for this change is to increase modularity and flexibility by using environment variables instead of secrets, making the solution more resilient and less reliant on specific single-use secrets.
  • Loading branch information
rodion-m committed Nov 17, 2023
1 parent 0ae319d commit fdb60b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ jobs:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT_URL: ${{ secrets.AZURE_OPENAI_ENDPOINT_URL }}
AZURE_OPENAI_DEPLOYMENT_NAME: ${{ secrets.AZURE_OPENAI_DEPLOYMENT_NAME }}
AZURE_OPENAI_ENDPOINT_URL: ${{ env.AZURE_OPENAI_ENDPOINT_URL }}
AZURE_OPENAI_DEPLOYMENT_NAME: ${{ env.AZURE_OPENAI_DEPLOYMENT_NAME }}
run: dotnet test --no-build --verbosity normal
3 changes: 3 additions & 0 deletions .github/workflows/publish_to_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Test
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_ENDPOINT_URL: ${{ env.AZURE_OPENAI_ENDPOINT_URL }}
AZURE_OPENAI_DEPLOYMENT_NAME: ${{ env.AZURE_OPENAI_DEPLOYMENT_NAME }}
run: dotnet test --no-build --verbosity normal

- name: Find NuGet packages
Expand Down

0 comments on commit fdb60b9

Please sign in to comment.