Skip to content

Commit

Permalink
Fix linting problems with dbt GitHub actions and workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jeancochrane committed Aug 3, 2023
1 parent ff4fd81 commit 297f7ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/variables/dbt.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DBT_PROJECT_DIR=./dbt
DBT_MANIFEST_DIR=./dbt/target
DBT_CACHE_NAME=dbt-cache
DBT_CACHE_NAME=dbt-cache
DBT_MANIFEST_DIR=./dbt/target
DBT_PROJECT_DIR=./dbt
20 changes: 13 additions & 7 deletions .github/workflows/build_and_test_dbt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,21 @@ jobs:
- name: Set environment for branch
run: |
if [[ $GITHUB_REF_NAME == 'master' ]]; then
echo "DBT_TARGET=prod" >> "$GITHUB_ENV"
echo "CACHE_KEY=master" >> "$GITHUB_ENV"
{
echo "DBT_TARGET=prod";
echo "CACHE_KEY=master";
} >> "$GITHUB_ENV"
elif [[ $GITHUB_REF_NAME == 'data-catalog' ]]; then
echo "DBT_TARGET=ci" >> "$GITHUB_ENV"
echo "CACHE_KEY=data-catalog" >> "$GITHUB_ENV"
echo "GITHUB_HEAD_REF=data-catalog" >> "$GITHUB_ENV"
{
echo "DBT_TARGET=ci";
echo "CACHE_KEY=data-catalog";
echo "GITHUB_HEAD_REF=data-catalog";
} >> "$GITHUB_ENV"
else
echo "DBT_TARGET=ci" >> "$GITHUB_ENV"
echo "CACHE_KEY=$GITHUB_HEAD_REF" >> "$GITHUB_ENV"
{
echo "DBT_TARGET=ci";
echo "CACHE_KEY=$GITHUB_HEAD_REF";
} >> "$GITHUB_ENV"
fi
shell: bash

Expand Down

0 comments on commit 297f7ec

Please sign in to comment.