Skip to content

Conversation

@vmaerten
Copy link
Member

@vmaerten vmaerten commented Dec 12, 2025

Summary

When a task fails in GitHub Actions, finding the error often means scrolling through hundreds of lines of logs. This PR changes that.

Task now automatically emits ::error:: annotations when running in GitHub Actions (GITHUB_ACTIONS=true). These annotations:

  • Appear directly in the workflow summary - no more hunting through logs
  • Show the task name - immediately know which task failed
  • Link to the error - click to jump to the relevant log line

Before

Errors are buried in logs, easy to miss when you have dozens of tasks running.

After

::error title=Task 'build' failed::exit status 1

The error appears as a red annotation at the top of the workflow run, visible at a glance.

image

Why this matters

  • Faster debugging - See what failed without reading logs
  • Better DX in CI - Task becomes a first-class citizen in GitHub Actions
  • Zero configuration - Works automatically, no setup required

Test plan

  • GITHUB_ACTIONS=true task failing-task emits ::error title=Task 'X' failed::...
  • Without GITHUB_ACTIONS=true, no annotation is emitted
  • Annotation includes task name when available (TaskRunError)
  • Generic errors also emit annotations

When a task fails and GITHUB_ACTIONS=true, emit a ::error:: annotation
that shows up in the workflow summary, making it easier to spot failures
without scrolling through logs.
@vmaerten vmaerten changed the title feat(ci): emit error annotations in GitHub Actions feat: emit error annotations in GitHub Actions Dec 12, 2025
Document automatic color detection and GitHub Actions error annotations.
@vmaerten vmaerten marked this pull request as ready for review December 12, 2025 18:58
Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just thinking if we want this only for output: group or something, but it will problem work well as is.
You may want to test with different group settings is easy enough.

@vmaerten vmaerten merged commit d7ee855 into main Dec 12, 2025
13 checks passed
@vmaerten vmaerten deleted the feat/gha branch December 12, 2025 20:23
vmaerten added a commit that referenced this pull request Dec 12, 2025
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

Successfully merging this pull request may close these issues.

3 participants