solvaholic / octodns-sync

GitHub Action to test and deploy DNS settings with OctoDNS
MIT License
28 stars 14 forks source link

Use screen, rather than tee, in entrypoint.sh #24

Closed solvaholic closed 3 years ago

solvaholic commented 3 years ago

to address the issue reported in #23

solvaholic commented 3 years ago

Would it work, to do it this way? With script rather than tee?

# Run octodns-sync.
echo "INFO: _config_path: ${_config_path}"
if [ "${_doit}" = "--doit" ]; then
  script "${GITHUB_WORKSPACE}/octodns-sync.log" \
  octodns-sync --config-file="${_config_path}" \
  --log-stream-stdout --doit
else
  script "${GITHUB_WORKSPACE}/octodns-sync.log" \
  octodns-sync --config-file="${_config_path}" \
  --log-stream-stdout
fi

I keep thinking there's already a pattern for putting the job output in helpful places. I should look that up.

solvaholic commented 3 years ago

Would it work, to do it this way? With script rather than tee?

Almost! script needed -e to preserve the error code and -c to tell it to run the command.