dnscontrol-action/entrypoint.sh

16 lines
301 B
Bash
Raw Normal View History

2019-01-05 19:24:28 +08:00
#!/usr/bin/env bash
set -eo pipefail
2019-01-05 19:24:28 +08:00
IFS=
OUTPUT="$(dnscontrol "$1")"
echo "$OUTPUT"
# https://github.community/t/set-output-truncates-multiline-strings/16852/3
OUTPUT="${OUTPUT//'%'/'%25'}"
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
echo "::set-output name=output::$OUTPUT"