Using new GITHUB_OUTPUT method

This commit is contained in:
Tobias Genannt 2023-01-28 15:42:32 +01:00
parent f549b93b9d
commit eef45c8197
4 changed files with 17 additions and 8 deletions

View file

@ -19,3 +19,14 @@ gh_env() {
echo "${@}" >>"${GITHUB_ENV}"
fi
}
###
# Prints the output to the file defined in ${GITHUB_OUTPUT}.
# Only executes if ${GH_ACTION} is defined.
# Example Usage: gh_env "FOO_VAR=bar_value"
###
gh_out() {
if [ -n "${GH_ACTION}" ]; then
echo "${@}" >>"$GITHUB_OUTPUT"
fi
}