Skip to content

Actions not triggered on push events for mirrored repos #24926

Closed
@dboreham

Description

@dboreham

Description

This is a regression since around 1.19.2.

Previously Actions tasks would be run according to their event and branch rules on mirrored commits.
But in the current code (1.19.2,3 and in today's main branch) that doesn't happen. Tasks are never run.

Some debugging reveals that this is because the workflow filtering code in matchPushEvent() checks the supplied refName to see if it is a branch in this function. That check fails in the mirrored code path because refName lacks the necessary prefix. That is, it ends up being "main" not "refs/heads/main".

I tested a somewhat blind fix in that it works but I don't understand this part of the code well enough to know if it's the right fix.

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

In docker-compose, using this setup: https://github.com/cerc-io/hosting/tree/main/gitea

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions