Skip to content

Commit

Permalink
fix logic cli install logic and add log grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
neel-astro committed Sep 3, 2024
1 parent 05df519 commit 1b28ccb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,33 @@ jobs:
deployment-id: <orginal deployment id>
```

## DBT Deploy to Deployment Preview

```yaml
name: Astronomer - DBT Deploy code to Preview
on:
pull_request:
branches:
- main
env:
## Sets Deployment API key credentials as environment variables
ASTRO_API_TOKEN: ${{ secrets.ASTRO_API_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to Deployment Preview
uses: astronomer/[email protected]
with:
action: dbt-deploy-deployment-preview
deployment-id: <orginal deployment id>
root-folder: dbt/
mount-path: /dbt
```

## Delete Deployment Preview

```yaml
Expand Down
6 changes: 3 additions & 3 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ runs:
run: |
echo ::group::Get DBT Deploy Options
if [[ "${{ inputs.action }}" != "dbt-deploy" || "${{ inputs.action }}" != "dbt-deploy-deployment-preview" ]]; then
if [[ "${{ inputs.action }}" != "dbt-deploy" && "${{ inputs.action }}" != "dbt-deploy-deployment-preview" ]]; then
echo "skipping the steps since the action is not dbt-deploy or dbt-deploy-deployment-preview"
echo "DBT_DEPLOY=0" >> $GITHUB_OUTPUT
exit 0
Expand Down Expand Up @@ -353,7 +353,7 @@ runs:
echo ::group::Get Deployment Type
# skip if the action is DBT Deploy
if [[ "${{ inputs.action }}" == "dbt-deploy" || "${{ inputs.action }}" == "dbt-deploy-deployment-preview" ]]; then
echo "skipping the steps since the action is dbt-deploy"
echo "skipping the steps since the action is one of dbt-deploy or dbt-deploy-deployment-preview"
exit 0
fi
Expand Down Expand Up @@ -409,7 +409,7 @@ runs:
echo ::group::Setup Deploy Options
# skip if the action is DBT Deploy
if [[ "${{ inputs.action }}" == "dbt-deploy" || "${{ inputs.action }}" == "dbt-deploy-deployment-preview" ]]; then
echo "skipping the steps since the action is dbt-deploy"
echo "skipping the steps since the action is one of dbt-deploy or dbt-deploy-deployment-preview"
exit 0
fi
Expand Down

0 comments on commit 1b28ccb

Please sign in to comment.