Deploy Microsoft WWI packages to Databricks #62
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Deploy Microsoft WWI packages to Databricks' | |
on: | |
workflow_dispatch: | |
inputs: | |
cluster_id: | |
description: 'Optionaly overwrite job cluster' | |
required: false | |
type: string | |
default: '' | |
jobs: | |
deploy: | |
name: "Build and Deploy Bundle to the Workspaces" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pip install poetry | |
# Download the Databricks CLI. | |
# See https://github.com/databricks/setup-cli | |
- uses: databricks/setup-cli@main | |
- name: Configure demo auth profile | |
run: | | |
echo -e "[demo]\nhost=${{ secrets.DATABRICKS_HOST }}" > .databrickscfg | |
- name: Validation | |
run: | | |
databricks auth env --host ${{ secrets.DATABRICKS_HOST }} | |
databricks bundle validate \ | |
-p demo | |
env: | |
DATABRICKS_CONFIG_FILE: .databrickscfg | |
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
DATABRICKS_BUNDLE_ENV: demo | |
# Deploy the bundle to the "demo" target as defined | |
# in the bundle's settings file. | |
- name: Deploy with custom cluster | |
if: ${{ github.event.inputs.cluster_id != '' }} | |
run: | | |
databricks bundle deploy \ | |
-c ${{ github.event.inputs.cluster_id }} \ | |
-p demo | |
env: | |
DATABRICKS_CONFIG_FILE: .databrickscfg | |
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
DATABRICKS_BUNDLE_ENV: demo | |
- name: Deploy with default cluster | |
if: ${{ github.event.inputs.cluster_id == '' }} | |
run: | | |
databricks bundle deploy \ | |
-p demo | |
env: | |
DATABRICKS_CONFIG_FILE: .databrickscfg | |
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }} | |
DATABRICKS_BUNDLE_ENV: demo | |