-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
109 lines (103 loc) · 4.2 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: 'Databricks Asset Bundles Deploy'
description: 'Deploy Databricks asset bundles using the Databricks CLI'
inputs:
working-directory:
description: 'The directory containing the Databricks asset bundle configuration'
required: true
databricks-host:
description: 'The Databricks workspace host URL'
required: true
databricks-bundle-env:
description: 'The target environment for the Databricks asset bundle deployment'
required: true
authentication-type:
description: 'The type of authentication to use (token or oauth)'
required: true
default: 'token'
databricks-token:
description: 'Databricks personal access token for authentication'
required: false
databricks-client-id:
description: 'Databricks OAuth client ID for authentication'
required: false
databricks-client-secret:
description: 'Databricks OAuth client secret for authentication'
required: false
arm-client-id:
description: 'Azure Managed Identity or Microsoft Entra ID client ID'
required: false
arm-client-secret:
description: 'Microsoft Entra ID client secret'
required: false
arm-tenant-id:
description: 'Microsoft Entra ID tenant ID'
required: false
google-credentials:
description: 'Google Cloud credentials for authentication'
required: false
runs:
using: "composite"
steps:
- uses: databricks/setup-cli@main
- name: Validate Input Parameters
run: bash $GITHUB_ACTION_PATH/validate-parameters.sh
shell: bash
env:
AUTHENTICATION_TYPE: ${{ inputs.authentication-type }}
DATABRICKS_TOKEN: ${{ inputs.databricks-token }}
DATABRICKS_CLIENT_ID: ${{ inputs.databricks-client-id }}
DATABRICKS_CLIENT_SECRET: ${{ inputs.databricks-client-secret }}
ARM_CLIENT_ID: ${{ inputs.arm-client-id }}
ARM_CLIENT_SECRET: ${{ inputs.arm-client-secret }}
ARM_TENANT_ID: ${{ inputs.arm-tenant-id }}
GOOGLE_CREDENTIALS: ${{ inputs.google-credentials }}
- name: Deploy Databricks Asset Bundle
if: ${{ inputs.authentication-type == 'token' }}
run: databricks bundle deploy
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
DATABRICKS_HOST: ${{ inputs.databricks-host }}
DATABRICKS_BUNDLE_ENV: ${{ inputs.databricks-bundle-env }}
DATABRICKS_TOKEN: ${{ inputs.databricks-token }}
- name: Deploy Databricks Asset Bundle
if: ${{ inputs.authentication-type == 'oauth' }}
run: databricks bundle deploy
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
DATABRICKS_HOST: ${{ inputs.databricks-host }}
DATABRICKS_BUNDLE_ENV: ${{ inputs.databricks-bundle-env }}
DATABRICKS_CLIENT_ID: ${{ inputs.databricks-client-id }}
DATABRICKS_CLIENT_SECRET: ${{ inputs.databricks-client-secret }}
- name: Deploy Databricks Asset Bundle
if: ${{ inputs.authentication-type == 'azure-managed-identity' }}
run: databricks bundle deploy
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
DATABRICKS_HOST: ${{ inputs.databricks-host }}
DATABRICKS_BUNDLE_ENV: ${{ inputs.databricks-bundle-env }}
ARM_CLIENT_ID: ${{ inputs.arm-client-id }}
ARM_USE_MSI: true
- name: Deploy Databricks Asset Bundle
if: ${{ inputs.authentication-type == 'microsoft-entra-id' }}
run: databricks bundle deploy
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
DATABRICKS_HOST: ${{ inputs.databricks-host }}
DATABRICKS_BUNDLE_ENV: ${{ inputs.databricks-bundle-env }}
ARM_CLIENT_ID: ${{ inputs.arm-client-id }}
ARM_CLIENT_SECRET: ${{ inputs.arm-client-secret }}
ARM_TENANT_ID: ${{ inputs.arm-tenant-id }}
ARM_USE_MSI: false
- name: Deploy Databricks Asset Bundle
if: ${{ inputs.authentication-type == 'google-credentials' }}
run: databricks bundle deploy
shell: bash
working-directory: ${{ inputs.working-directory }}
env:
DATABRICKS_HOST: ${{ inputs.databricks-host }}
DATABRICKS_BUNDLE_ENV: ${{ inputs.databricks-bundle-env }}
GOOGLE_CREDENTIALS: ${{ inputs.google-credentials }}