-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.53 KB
/
cd.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
# Sample YAML file to deploy Data Factory resources from an ARM template
name: CD
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
resourceGroupName: rg-adf-github-demo
dataFactoryName: adfghdemo
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
- name: Login via Az module
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
enable-AzPSSession: true
- name: Export ARM Template
id: export
uses: Azure/[email protected]
# with:
# path: <data-factory-dir> # replace by the folder that contains the Data Factory resources and the package.json
- name: Deploy resources
uses: Azure/[email protected]
with:
resourceGroupName: ${{ env.resourceGroupName }}
dataFactoryName: ${{ env.dataFactoryName }}
armTemplateFile: '${{steps.export.outputs.arm-template-directory}}/ARMTemplateForFactory.json'
armTemplateParametersFile: '${{steps.export.outputs.arm-template-directory}}/ARMTemplateParametersForFactory.json'
# additionalParameters: 'key1=value key2=value keyN=value' [optional]
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: data-factory-package
path: ${{ steps.export.outputs.arm-template-directory }}
if-no-files-found: error