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

Feature request: output annotations when run under Github Actions #103

Open
jhenstridge opened this issue Apr 8, 2020 · 0 comments
Open

Comments

@jhenstridge
Copy link

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 actions/toolkit#193, it seems like it is possible to encode new lines in the annotation message using %0A.

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

No branches or pull requests

1 participant