-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: use delimiter in accorance with docs to handle strings with newlines in snapshot release action #11741
chore: use delimiter in accorance with docs to handle strings with newlines in snapshot release action #11741
Conversation
…wlines per GHA docs
|
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just had a question about the variable used for GITHUB_OUTPUT
but otherwise looks great. Thanks for hopping in this so fast!
delimiter="$(openssl rand -hex 8)" | ||
echo "changesets<<${delimiter}" >> "${GITHUB_OUTPUT}" | ||
echo "$(git diff --name-only --diff-filter=A ${{ steps.comment-branch.outputs.base_sha }} ${{ steps.comment-branch.outputs.head_sha }} .changeset/*.md)" >> "${GITHUB_OUTPUT}" | ||
echo "${delimiter}" >> "${GITHUB_OUTPUT}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm, is the ${GITHUB_OUTPUT}
format correct? I'm seeing $GITHUB_OUTPUT
in those docs, but maybe I'm missing context here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Sorry I missed this before. We could do without curly braces here, but syntactically they're fine to include (e.g. if we wanted to expand the variable foo
in a string it would be "${foo}bar"
whereas "$foobar"
would expand the variable foobar
).
Fixes failing snapshot release action with multiple changesets, see https://github.com/apollographql/apollo-client/actions/runs/8510609697/job/23308544668.
See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings for docs on using mutli-line strings with
GITHUB_OUTPUT
GHA env variable.