Skip to content

Commit

Permalink
Test deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
aamend committed Mar 8, 2024
1 parent e330541 commit bf17700
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: publish

env:
DB_PROFILE: ${{ secrets.DB_PROFILE }}
DB_PROFILES: ${{ secrets.DB_PROFILES }}

on:
workflow_dispatch:
Expand Down Expand Up @@ -45,18 +45,16 @@ jobs:
run: |
import os
import json
from databricks.solution import Accelerator
import configparser
import io
environments = json.loads(os.environ['DB_PROFILES'])
if '${{ github.event.repository.db_profile }}' not in environments:
raise Exception('Profile is not supported. Please check secret information')
buf = io.StringIO(os.environ['DB_PROFILES'])
config = configparser.ConfigParser()
config.read_file(buf)
environment = environments['${{ github.event.repository.db_profile }}']
Accelerator(
db_host=environment['host'],
db_token=environment['token'],
db_host=config['host'],
db_token=config['token'],
db_path='${{ github.event.inputs.path }}',
db_name='${{ github.event.repository.name }}',
).release()
Expand Down

0 comments on commit bf17700

Please sign in to comment.