forked from Azure/reliable-web-app-pattern-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.5 KB
/
azure-dev.yml
File metadata and controls
47 lines (40 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This file is part of the sample that you can use to build your devOps automation.
# See the README markdown file for further details
on:
workflow_dispatch:
# on:
# pull_request:
# types: [opened, reopened]
jobs:
build:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/azure-dev-cli-apps:latest
steps:
- name: Checkout
uses: actions/checkout@v2
# login to run ado commands such provision, deploy, and down
- name: Log in with Azure (Client Credentials)
if: ${{ env.AZURE_CREDENTIALS != '' }}
run: |
$info = $Env:AZURE_CREDENTIALS | ConvertFrom-Json -AsHashtable;
Write-Host "::add-mask::$($info.clientSecret)"
azd login `
--client-id "$($info.clientId)" `
--client-secret "$($info.clientSecret)" `
--tenant-id "$($info.tenantId)"
shell: pwsh
env:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
- name: Azure Dev Provision
run: azd provision --no-prompt
env:
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}dev
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Azure Dev Deploy
run: azd deploy --no-prompt
env:
AZURE_ENV_NAME: ${{ secrets.AZURE_ENV_NAME }}dev
AZURE_LOCATION: ${{ secrets.AZURE_LOCATION }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}