-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.28 KB
/
Copy pathmain.yml
File metadata and controls
45 lines (38 loc) · 1.28 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
name: Azure ARM
on: push
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
# Checkout code
- uses: actions/checkout@main
# Log into Azure
- uses: azure/login@v1
with:
enable-AzPSSession: true
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Create ResourceGroup
uses: azure/CLI@v1
with:
inlineScript: |
call New-AzResourceGroup -Name ${{ secrets.AZURE_RG }} -Location "West Europe"
- name: Set PowerShell execution policy
uses: azure/CLI@v1
with:
inlineScript: |
Set-ExecutionPolicy Unrestricted
- name: Install Az.Resources PowerShell Module
uses: azure/CLI@v1
with:
inlineScript: |
Get-Module -Name Az.Resources -AllowClobber -Scope CurrentUser
# Deploy ARM template
- name: Run ARM deploy
uses: azure/arm-deploy@v1
with:
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION }}
resourceGroupName: ${{ secrets.AZURE_RG }}
template: ./azuredeploy.json
parameters: storageAccountType=Standard_LRS
# output containerName variable from template
- run: echo ${{ steps.deploy.outputs.containerName }}