Feature request: output annotations when run under Github Actions
- Dominant language
- Go
- Stars
- 127
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice if Spread integrated better with Github Actions. In snapd, we have a problem matcher to convert errors in Spread's output to annotations:
https://github.com/snapcore/snapd/blob/master/.github/spread-problem-matcher.json
While this is a good start, it has a few deficiencies:
1. The annotation only reports the single line of the error message.
2. The annotation has no file name or line number information.
We can't solve either of these via problem matchers, so the alternative would be for Spread to detect it is running under Github Actions (e.g. by checking for the `GITHUB_ACTIONS` environment variable), and then output error annotations directly with the `::error::` command:
https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
I realise that mapping errors to line numbers in the yaml file would be difficult, but it would be nice to at least associate the error message with the `task.yaml` file.
Looking at https://github.com/actions/toolkit/issues/193, it seems like it is possible to encode new lines in the annotation message using `%0A`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.