Skip to content

Gitea Actions paths filters incorrectly trigger during rebase operations #34710

Open
@JohnKiller

Description

@JohnKiller

Description

When rebasing a feature branch onto master/main, Gitea Actions workflows with paths filters are incorrectly triggered for files that were touched during the rebase process, even when those files are not actually changed in the final diff of the pull request.

  1. Create a monorepo with multiple directories (e.g., app1/, app2/, shared/)
  2. Set up a Gitea Actions workflow with path filters, separate for app1 and app2. For example:
    name: App1 CI
    on:
      push:
        paths:
          - app1/**
      pull_request:
        paths:
          - app1/**
  3. Create a feature branch and make changes only to app2/ files
  4. Meanwhile, changes are made to app1/ files on master
  5. Rebase the feature branch onto the updated master: git rebase master
  6. Push the rebased branch

The App1 CI workflow should NOT trigger because:

  • The feature branch only modified app2/ files
  • The final diff of the PR shows no changes to app1/ files
  • The paths: - app1/** filter should prevent execution

But instead, it runs both actions.

I don't know if this has been already discussed or if it is intended behavior, but in GitHub it works as it should...

Gitea Version

v1.24.0

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?

Self-hosted

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions