-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (74 loc) · 2.28 KB
/
logicapp_deploy.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build and Deploy Logic App.
env:
LA_NAME: 'laname-467657'
on:
workflow_dispatch:
# Trigger the workflow every time the infrastructure build workflow ran to completion
workflow_run:
workflows:
- Logic App Infrastructure as Code Pipeline.
types:
- completed
# Triggers when Logic Apps workflow logic has changed
push:
paths:
- "logic/**"
- ".github/workflows/logicapp_deploy.yml"
jobs:
logic_app_build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Package logic
run: (cd solution/logic; mkdir -p ../../build-art; zip -r ../../build-art/logic.zip .)
- name: Upload app zip package
uses: actions/upload-artifact@v2
with:
name: logic
path: ./build-art/
retention-days: 1
logic_app_deploy_dev:
name: Deploy Dev
runs-on: ubuntu-latest
needs: [logic_app_build]
environment:
name: dev
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Login via Az module
uses: azure/login@v1
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
enable-AzPSSession: true
- uses: actions/download-artifact@master
with:
name: logic
path: ./build-art/
- name: Get publish Profile
id: publishprofile
uses: azure/powershell@v1
with:
inlineScript: |
$profile = Get-AzWebAppPublishingProfile `
-ResourceGroupName ${{ secrets.RG_LA }} `
-Name ${{ env.LA_NAME }}
$profile = $profile.Replace("`r", "").Replace("`n", "")
Write-Output "::set-output name=profile::$profile"
azPSVersion: latest
- name: Deploy to Azure Logic App
uses: Azure/[email protected]
id: la
with:
app-name: ${{secrets.RG_LA}}
package: './build-art/logic.zip'
publish-profile: ${{steps.publishprofile.outputs.profile}}
- name: Swap parameter files
id: params
uses: azure/powershell@v1
with:
inlineScript: |
az functionapp deploy --resource-group ${{ secrets.RG_LA }} --name ${{ env.LA_NAME }} --src-path logic/azure.parameters.json --type static --target-path parameters.json
azPSVersion: latest