Skip to content

Commit 19b2650

Browse files
committed
CI: Rework multiline string GitHub output
1 parent 622aee9 commit 19b2650

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -167,16 +167,14 @@ jobs:
167167
ENABLE_OVN: ${{ inputs.neutron_plugin == 'ovn' }}
168168
OS_DISTRIBUTION: ${{ inputs.os_distribution }}
169169

170-
# https://renehernandez.io/snippets/multiline-strings-as-a-job-output-in-github-actions/
170+
# Use a heredoc to define a multiline string output
171+
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
171172
- name: Set SSH key output
172173
id: ssh_key
173174
run: |
174-
ssh_key="$(cat terraform/aio/id_rsa)"
175-
ssh_key="${ssh_key//'%'/'%25'}"
176-
ssh_key="${ssh_key//$'\n'/'%0A'}"
177-
ssh_key="${ssh_key//$'\r'/'%0D'}"
178-
echo "::add-mask::$ssh_key"
179-
echo "ssh_key=$ssh_key" >> $GITHUB_OUTPUT
175+
echo "ssh_key<<EOF" >> $GITHUB_OUTPUT
176+
cat terraform/aio/id_rsa >> $GITHUB_OUTPUT
177+
echo "EOF" >> $GITHUB_OUTPUT
180178
181179
# The same tag may be reused (e.g. pr-123), so ensure we have the latest image.
182180
- name: Pull latest Kayobe image

0 commit comments

Comments
 (0)