yq/github-action/entrypoint.sh

11 lines
368 B
Bash
Raw Normal View History

2020-02-24 09:04:45 +00:00
#!/bin/sh -l
2021-07-24 05:06:23 +00:00
set -e
2021-06-08 13:14:00 +00:00
echo "::debug::\$cmd: $1"
RESULT=$(eval "$1")
2021-09-12 01:07:32 +00:00
RESULT="${RESULT//'%'/'%25'}"
RESULT="${RESULT//$'\n'/'%0A'}"
RESULT="${RESULT//$'\r'/'%0D'}"
2021-06-08 13:14:00 +00:00
echo "::debug::\$RESULT: $RESULT"
# updating from
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
echo "RESULT=$RESULT" >> $GITHUB_OUTPUT