From 75092c4d30574004e1f3865637893acc27987849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Gl=C3=A4=C3=9Fle?= Date: Fri, 12 May 2023 16:51:10 +0200 Subject: [PATCH] Replace deprecated ::set-output (will stop working in June 2023) See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings --- .github/utils/set-output | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/utils/set-output b/.github/utils/set-output index 24bc8ecf3..d3685f080 100755 --- a/.github/utils/set-output +++ b/.github/utils/set-output @@ -4,11 +4,8 @@ # Usage: set-output name=$1 value=$2 +delim=EOS_$(openssl rand -hex 16) -# Escape '\n', '\r', '%' to make this work with multi-line strings, see: -# https://github.community/t/set-output-truncates-multiline-strings/16852 -value="${value//'%'/'%25'}" -value="${value//$'\n'/'%0A'}" -value="${value//$'\r'/'%0D'}" - -echo "::set-output name=$name::$value" +echo >>"$GITHUB_OUTPUT" "$name<<$delim" +echo >>"$GITHUB_OUTPUT" "$value" +echo >>"$GITHUB_OUTPUT" "$delim"