Skip to content

Commit 576daf6

Browse files
authored
Multiline GitHub Output Fix (#136)
* Put in missing ')' in `jq` * Use a heredoc for multiline GITHUB_OUTPUT
1 parent 0c65447 commit 576daf6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/settings-2-deploy.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,26 @@ jobs:
3434
)
3535
3636
echo "$updates"
37-
echo "updates=$updates" >> $GITHUB_OUTPUT
37+
# For multiline output, use a heredoc. See https://github.com/orgs/community/discussions/116619#discussioncomment-8994849
38+
echo "updates<<EOF" >> $GITHUB_OUTPUT
39+
echo "$updates" >> $GITHUB_OUTPUT
40+
echo "EOF" >> $GITHUB_OUTPUT
3841
3942
- name: Setup spack-config updates
4043
id: spack-config
4144
run: |
4245
updates=$(jq --compact-output --raw-output \
4346
--arg env "${{ inputs.deployment-environment }}" \
4447
--arg type "${{ inputs.spack-type }}" \
45-
'.deployment[$env][$type] | to_entries[] | "\(.key) \(.value.spack-config"' \
48+
'.deployment[$env][$type] | to_entries[] | "\(.key) \(.value.spack-config)"' \
4649
${{ env.CONFIG_SETTINGS_PATH }}
4750
)
4851
4952
echo "$updates"
50-
echo "updates=$updates" >> $GITHUB_OUTPUT
53+
# For multiline output, use a heredoc. See https://github.com/orgs/community/discussions/116619#discussioncomment-8994849
54+
echo "updates<<EOF" >> $GITHUB_OUTPUT
55+
echo "$updates" >> $GITHUB_OUTPUT
56+
echo "EOF" >> $GITHUB_OUTPUT
5157
5258
- name: Setup SSH
5359
id: ssh

0 commit comments

Comments
 (0)