Skip to content
Latchkey

Gitea Actions "task failed" (job failed on the runner) in CI

A "task failed" result means the runner picked up the job and it ended in failure. Either a step returned a non-zero exit code, or the runner hit an execution error preparing or running the task. The step log has the specific cause.

What this error means

The run shows a red task with a "task failed" or "job failed" status. The runner log names the step that exited non-zero or an execution error during setup.

act_runner
level=error msg="task `1` failed" ...
##[error]Process completed with exit code 1.

Common causes

A step command exited non-zero

A build, lint, or test command failed and returned a non-zero code, which fails the task.

The runner could not set up the task

A missing image, unreachable action, or environment problem stops the task before or during a step.

How to fix it

Open the failing step in the run log

  1. Expand the red step and read the last lines before the exit code.
  2. Reproduce that command locally to see the real error.
  3. Fix the command or its inputs, then re-run.

Rule out setup failures first

If the failure is in checkout or action setup, the cause is image/action/network, not your code; fix the runner image or actions source.

Terminal
# check the runner daemon log around the failed task
journalctl -u act_runner --since "10 min ago"

How to prevent it

  • Keep steps small so a failure points at one command.
  • Fail fast with set -e in shell steps.
  • Separate setup failures from test failures in the log.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →