Merge remote-tracking branch 'origin/main' #8
Workflow file for this run
This file contains hidden or 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
| # This GitHub workflow deploys Bundle resources (ML resource config and more) | |
| # defined under mlops_demo/resources/* | |
| # and mlops_demo/databricks.yml with prod deployment target configs, | |
| # when a release tag is created on the default/main branch | |
| name: Bundle Deployment for mlops_demo Prod | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # deploy to prod only if main branch is tagged | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| working-directory: ./mlops_demo | |
| env: | |
| DATABRICKS_TOKEN: ${{ secrets.PROD_WORKSPACE_TOKEN }} | |
| jobs: | |
| prod: | |
| #if: github.ref == 'refs/heads/main' # Ensures it runs only if the main branch is tagged | |
| concurrency: mlops_demo-prod-bundle-job | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: databricks/[email protected] | |
| - name: Validate Bundle For Prod | |
| id: validate | |
| run: | | |
| databricks bundle validate -t prod | |
| - name: Deploy Bundle to Prod | |
| id: deploy | |
| run: | | |
| databricks bundle deploy -t prod |