This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
action.yml
60 lines (55 loc) · 2.08 KB
/
action.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
name: data-factory-deploy
description: Deploy Azure Data Factory resources
inputs:
resourceGroupName:
description: 'Data Factory resource group name'
required: true
dataFactoryName:
description: 'Data factory name'
required: true
armTemplateFile:
description: 'ARM template file name'
required: false
default: 'ARMTemplateForFactory.json'
armTemplateParametersFile:
description: 'ARM template parameters file name'
required: false
default: 'ARMTemplateParametersForFactory.json'
additionalParameters:
description: 'Parameters which will be replaced in the ARM template'
required: false
default: ''
skipAzModuleInstallation:
description: 'Parameters which skip the Az module installation'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: Install Az PowerShell module
run: if('${{ inputs.skipAzModuleInstallation }}' -ne 'true') { Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force }
shell: pwsh
- name: Run Pre-deployment script
run: |
${{ github.action_path }}/PrePostDeploymentScript.ps1 `
-armTemplate "${{ inputs.armTemplateFile }}" `
-ResourceGroupName "${{ inputs.resourceGroupName }}" `
-DataFactoryName "${{ inputs.dataFactoryName }}" `
-predeployment $true `
-deleteDeployment $false
shell: pwsh
- name: Run ARM deploy
uses: azure/arm-deploy@v1
with:
resourceGroupName: ${{ inputs.resourceGroupName }}
template: ${{ inputs.armTemplateFile }}
parameters: ${{ inputs.armTemplateParametersFile }} factoryName=${{ inputs.dataFactoryName }} ${{ inputs.additionalParameters }}
- name: Run Post-deployment script
run: |
${{ github.action_path }}/PrePostDeploymentScript.ps1 `
-armTemplate "${{ inputs.armTemplateFile }}" `
-ResourceGroupName "${{ inputs.resourceGroupName }}" `
-DataFactoryName '${{ inputs.dataFactoryName }}' `
-predeployment $false `
-deleteDeployment $true
shell: pwsh