Skip to content

Commit

Permalink
Merge pull request #40 from joelazar/master
Browse files Browse the repository at this point in the history
rename dbt_log_* vars to dbt_action_log_*
  • Loading branch information
mwhitaker authored Oct 9, 2022
2 parents 9f09e92 + ad8bc5b commit 25e76ae
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The result of the dbt command is either `failed` or `passed` and is saved into t
run: echo "${{ steps.dbt-run.outputs.result }}"
shell: bash
```
The result output is also saved in the `DBT_RUN_STATE` environment variable. The location of the dbt console log output can be accessed via the environment variable `DBT_LOG_PATH`. See the "Suggested workflow" section on how to use these.
The result output is also saved in the `DBT_RUN_STATE` environment variable. The location of the dbt console log output can be accessed via the environment variable `DBT_ACTION_LOG_PATH`. See the "Suggested workflow" section on how to use these.

### General Setup

Expand Down
14 changes: 7 additions & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ else
echo no tokens or credentials supplied
fi

DBT_LOG_FILE=${DBT_LOG_FILE:="dbt_console_output.txt"}
DBT_LOG_PATH="${INPUT_DBT_PROJECT_FOLDER}/${DBT_LOG_FILE}"
echo "DBT_LOG_PATH=${DBT_LOG_PATH}" >> $GITHUB_ENV
echo "saving console output in \"${DBT_LOG_PATH}\""
$1 2>&1 | tee "${DBT_LOG_FILE}"
DBT_ACTION_LOG_FILE=${DBT_ACTION_LOG_FILE:="dbt_console_output.txt"}
DBT_ACTION_LOG_PATH="${INPUT_DBT_PROJECT_FOLDER}/${DBT_ACTION_LOG_FILE}"
echo "DBT_ACTION_LOG_PATH=${DBT_ACTION_LOG_PATH}" >> $GITHUB_ENV
echo "saving console output in \"${DBT_ACTION_LOG_PATH}\""
$1 2>&1 | tee "${DBT_ACTION_LOG_FILE}"
if [ $? -eq 0 ]
then
echo "DBT_RUN_STATE=passed" >> $GITHUB_ENV
echo "::set-output name=result::passed"
echo "DBT run OK" >> "${DBT_LOG_FILE}"
echo "DBT run OK" >> "${DBT_ACTION_LOG_FILE}"
else
echo "DBT_RUN_STATE=failed" >> $GITHUB_ENV
echo "::set-output name=result::failed"
echo "DBT run failed" >> "${DBT_LOG_FILE}"
echo "DBT run failed" >> "${DBT_ACTION_LOG_FILE}"
exit 1
fi

0 comments on commit 25e76ae

Please sign in to comment.