Add devcontainer settings (#31) #47
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
name: Azure Dev | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '.github/**' | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build-test-deploy: | |
runs-on: ubuntu-latest | |
env: | |
AZURE_CLIENT_ID: ${{ vars.AZURE_CLIENT_ID }} | |
AZURE_TENANT_ID: ${{ vars.AZURE_TENANT_ID }} | |
AZURE_SUBSCRIPTION_ID: ${{ vars.AZURE_SUBSCRIPTION_ID }} | |
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }} | |
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- name: Install local certs | |
shell: pwsh | |
run: | | |
dotnet tool update -g linux-dev-certs | |
dotnet linux-dev-certs install | |
- name: Install Aspire workload | |
shell: pwsh | |
run: | | |
dotnet workload update | |
dotnet workload install aspire | |
- name: Restore NuGet packages | |
shell: bash | |
run: | | |
dotnet restore | |
- name: Build solution | |
shell: bash | |
run: | | |
dotnet build | |
- name: Test solution | |
shell: bash | |
run: | | |
dotnet test | |
- name: Install azd | |
uses: Azure/[email protected] | |
- name: Log in with Azure (Federated Credentials) | |
if: env.AZURE_CLIENT_ID != '' | |
run: | | |
azd auth login ` | |
--client-id "$Env:AZURE_CLIENT_ID" ` | |
--federated-credential-provider "github" ` | |
--tenant-id "$Env:AZURE_TENANT_ID" | |
shell: pwsh | |
- name: Provision Infrastructure | |
run: azd provision --no-prompt | |
env: | |
AZD_INITIAL_ENVIRONMENT_CONFIG: ${{ secrets.AZD_INITIAL_ENVIRONMENT_CONFIG }} | |
- name: Deploy Application | |
run: azd deploy --no-prompt |