Skip to content

Workflows started manually with workflow_dispatch runs the main branch workflow for other branches #33559

Closed
@DesktopMan

Description

@DesktopMan

Description

If you start a workflow manually you can choose which branch to run the workflow on. The workflow from the main branch is then executed on the target branch. Shouldn't a manually executed workflow use the workflow file from the branch, and give an error if it doesn't exist?

Steps to reproduce:

  1. Have two branches without workflows: main and test
  2. Add a workflow to the main branch with workflow_dispatch
  3. Manually trigger the workflow, select the test branch

The workflow from the main branch now runs on the test branch, even though the test branch doesn't have any workflows. If the test branch had an updated workflow the old workflow from main would still be used.

Gitea Version

1.23.1

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 using official Docker images with Docker Compose.

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detailtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions