Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

DCV-1205 deprecate set-output in favor of writing tov GITHUB_OUTPUT #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,17 @@ cd ${INPUT_DBT_PROJECT_FOLDER}

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 "DBT_LOG_PATH=${DBT_LOG_PATH}" >>$GITHUB_ENV
echo "saving console output in \"${DBT_LOG_PATH}\""
eval $1 2>&1 | tee "${DBT_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}"
else
echo "DBT_RUN_STATE=failed" >> $GITHUB_ENV
echo "::set-output name=result::failed"
echo "DBT run failed" >> "${DBT_LOG_FILE}"
exit 1
if [ $? -eq 0 ]; then
echo "DBT_RUN_STATE=passed" >>$GITHUB_ENV
echo "{result}={passed}" >>$GITHUB_OUTPUT
echo "DBT run OK" >>"${DBT_LOG_FILE}"
else
echo "DBT_RUN_STATE=failed" >>$GITHUB_ENV
echo "{result}={failed}" >>$GITHUB_OUTPUT
echo "DBT run failed" >>"${DBT_LOG_FILE}"
exit 1
fi