-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,26 +22,26 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Login to Azure | ||
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | ||
# if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | ||
uses: azure/login@v1 | ||
with: | ||
tenant-id: ${{ vars.AZURE_TENANT_ID }} | ||
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }} | ||
client-id: ${{ vars.AZURE_CLIENT_ID }} | ||
|
||
# - name: Install Azure Developer CLI | ||
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | ||
# if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | ||
# uses: Azure/[email protected] | ||
|
||
- name: Install Azure Developer CLI (nightly build) | ||
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | ||
# if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | ||
shell: pwsh | ||
run: | | ||
Invoke-RestMethod 'https://aka.ms/install-azd.ps1' -OutFile ./install-azd.ps1 | ||
./install-azd.ps1 -Version daily | ||
- name: Login to Azure Developer CLI | ||
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | ||
# if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | ||
shell: pwsh | ||
run: | | ||
azd auth login ` | ||
|
@@ -50,7 +50,7 @@ jobs: | |
--federated-credential-provider "${{ vars.AZD_PIPELINE_PROVIDER }}" | ||
- name: Setup environment | ||
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | ||
# if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | ||
shell: pwsh | ||
run: | | ||
# Create config.json under .azure | ||
|
@@ -80,7 +80,7 @@ jobs: | |
$dotenv | Out-File -Path ./.azure/${{ vars.AZURE_ENV_NAME }}/.env -Force | ||
- name: Update appsettings.json | ||
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | ||
# if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | ||
shell: pwsh | ||
run: | | ||
$resourceName = az resource list -g rg-${{ vars.AZURE_ENV_NAME }} --query "[?type=='Microsoft.CognitiveServices/accounts'].name" -o tsv | ||
|
@@ -90,12 +90,12 @@ jobs: | |
$openAI = @{ Endpoint = $endpoint; ApiKey = $apiKey; DeploymentId = $deploymentId; } | ||
Copy-Item -Path ./AspireYouTubeSummariser.AppHost/appsettings.Development.sample.json ` | ||
-Destination ./AspireYouTubeSummariser.AppHost/appsettings.Development.json -Force | ||
# Copy-Item -Path ./AspireYouTubeSummariser.AppHost/appsettings.Development.sample.json ` | ||
# -Destination ./AspireYouTubeSummariser.AppHost/appsettings.Development.json -Force | ||
$appsettings = Get-Content -Path ./AspireYouTubeSummariser.AppHost/appsettings.Development.json | ConvertFrom-Json | ||
$appsettings = Get-Content -Path ./AspireYouTubeSummariser.AppHost/appsettings.json | ConvertFrom-Json | ||
$appsettings.OpenAI = $openAI | ||
$appsettings | ConvertTo-Json -Depth 100 | Out-File -Path ./AspireYouTubeSummariser.AppHost/appsettings.Development.json -Force | ||
$appsettings | ConvertTo-Json -Depth 100 | Out-File -Path ./AspireYouTubeSummariser.AppHost/appsettings.json -Force | ||
- name: Setup .NET SDK | ||
uses: actions/setup-dotnet@v3 | ||
|
@@ -124,7 +124,7 @@ jobs: | |
dotnet test | ||
- name: Deploy to Azure Container Apps | ||
# if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' | ||
# if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | ||
shell: pwsh | ||
run: | | ||
azd deploy |