mirror of
https://github.com/koenrh/dnscontrol-action.git
synced 2024-09-20 12:05:57 +08:00
Output the "dnscontrol" output in the Action
This commit is contained in:
parent
fc2b491250
commit
5df73401c5
|
@ -9,6 +9,9 @@ inputs:
|
||||||
args:
|
args:
|
||||||
description: DNSControl command
|
description: DNSControl command
|
||||||
required: true
|
required: true
|
||||||
|
outputs:
|
||||||
|
output:
|
||||||
|
description: The output of the dnscontrol command that was executed.
|
||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
|
|
@ -2,4 +2,13 @@
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
sh -c "dnscontrol $*"
|
OUTPUT=`sh -c "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"
|
||||||
|
|
Loading…
Reference in a new issue