Skip to content

Commit

Permalink
remove set-env and use environment file
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhitaker committed Oct 6, 2020
1 parent f77d7db commit ac54e00
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ fi

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

0 comments on commit ac54e00

Please sign in to comment.