Skip to content
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

Use multi-line $GITHUB_OUTPUT syntax for the changelog entry output #692

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

edmorley
Copy link
Member

@edmorley edmorley commented Sep 25, 2023

The changelog entry is multi-line, so we need to use the multi-line syntax when using the $GITHUB_OUTPUT file.

This resolves:

Error: Unable to process file command 'output' successfully.
Error: Invalid format '### Added'

(from https://github.com/heroku/libcnb.rs/actions/runs/6299338275/job/17099895465#step:9:9)

See:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings

GUS-W-14177169.

…tput

The changelog entry is multi-line, so we need to use the multi-line syntax
when using the `$GITHUB_OUTPUT` file.

This resolves:

```
Error: Unable to process file command 'output' successfully.
Error: Invalid format '### Added'
```

See:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings

GUS-W-14177169.
@edmorley edmorley self-assigned this Sep 25, 2023
@edmorley edmorley marked this pull request as ready for review September 25, 2023 12:44
@edmorley edmorley requested a review from a team as a code owner September 25, 2023 12:44
@edmorley edmorley enabled auto-merge (squash) September 25, 2023 12:44
@edmorley edmorley merged commit 56b4f4e into main Sep 25, 2023
5 checks passed
@edmorley edmorley deleted the edmorley/fix-release-changelog-output branch September 25, 2023 13:02
colincasey pushed a commit to heroku/languages-github-actions that referenced this pull request Feb 1, 2024
Currently if the `git log` generated to populate the PR description
contains more than one commit, the workflow fails with errors like:

```
Error: Unable to process file command 'output' successfully.
Error: Invalid format '- Migrate from CircleCI to GHA (#214)'
```

This is because of the GitHub Actions gotcha around multi-line
strings when using `GITHUB_OUTPUT` (or `GITHUB_ENV`):
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings

This didn't come up during testing, since the repo I tried with
didn't have multiple commits on `main` since the last tag.

See also:
heroku/heroku-buildpack-nodejs#1153
heroku/libcnb.rs#692

GUS-W-14894410.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants