changes #5
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
| name: 'Deploy to environments' | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| deploy-test: | |
| name: 'Deploy to test' | |
| uses: ./.github/workflows/dabs.yml | |
| if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') | |
| with: | |
| workflow_name: 'Test deployment' | |
| environment: 'test' | |
| target: 'test' | |
| secrets: | |
| DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_CLIENT_SECRET: ${{ secrets.DATABRICKS_CLIENT_SECRET }} | |
| DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }} | |
| deploy-qa: | |
| name: 'Deploy to QA' | |
| uses: ./.github/workflows/dabs.yml | |
| needs: deploy-test | |
| if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/tags/') | |
| with: | |
| workflow_name: 'QA deployment' | |
| environment: 'qa' | |
| target: 'qa' | |
| secrets: | |
| DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_CLIENT_SECRET: ${{ secrets.DATABRICKS_CLIENT_SECRET }} | |
| DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }} | |
| deploy-prod: | |
| name: 'Deploy to prod' | |
| uses: ./.github/workflows/dabs.yml | |
| needs: deploy-qa | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| workflow_name: 'Prod deployment' | |
| environment: 'prod' | |
| target: 'prod' | |
| secrets: | |
| DATABRICKS_HOST: ${{ secrets.DATABRICKS_HOST }} | |
| DATABRICKS_CLIENT_SECRET: ${{ secrets.DATABRICKS_CLIENT_SECRET }} | |
| DATABRICKS_CLIENT_ID: ${{ secrets.DATABRICKS_CLIENT_ID }} | |