Skip to content

Commit

Permalink
Multiline GitHub Output Fix (#136)
Browse files Browse the repository at this point in the history
* Put in missing ')' in `jq`

* Use a heredoc for multiline GITHUB_OUTPUT
  • Loading branch information
CodeGat authored Sep 24, 2024
1 parent 0c65447 commit 576daf6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/settings-2-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,26 @@ jobs:
)
echo "$updates"
echo "updates=$updates" >> $GITHUB_OUTPUT
# For multiline output, use a heredoc. See https://github.com/orgs/community/discussions/116619#discussioncomment-8994849
echo "updates<<EOF" >> $GITHUB_OUTPUT
echo "$updates" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Setup spack-config updates
id: spack-config
run: |
updates=$(jq --compact-output --raw-output \
--arg env "${{ inputs.deployment-environment }}" \
--arg type "${{ inputs.spack-type }}" \
'.deployment[$env][$type] | to_entries[] | "\(.key) \(.value.spack-config"' \
'.deployment[$env][$type] | to_entries[] | "\(.key) \(.value.spack-config)"' \
${{ env.CONFIG_SETTINGS_PATH }}
)
echo "$updates"
echo "updates=$updates" >> $GITHUB_OUTPUT
# For multiline output, use a heredoc. See https://github.com/orgs/community/discussions/116619#discussioncomment-8994849
echo "updates<<EOF" >> $GITHUB_OUTPUT
echo "$updates" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Setup SSH
id: ssh
Expand Down

0 comments on commit 576daf6

Please sign in to comment.