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

Closed
opened 2025-11-02 11:03:36 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @DesktopMan on GitHub (Feb 11, 2025).

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

Originally created by @DesktopMan on GitHub (Feb 11, 2025). ### 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
GiteaMirror added the type/bugissue/needs-feedback labels 2025-11-02 11:03:36 -06:00
Author
Owner

@austinankur commented on GitHub (Feb 12, 2025):

I can confirm this bug

@austinankur commented on GitHub (Feb 12, 2025): I can confirm this bug
Author
Owner

@Zettat123 commented on GitHub (Feb 13, 2025):

I think this issue has been fixed by

@Zettat123 commented on GitHub (Feb 13, 2025): I think this issue has been fixed by - #33098
Author
Owner

@GiteaBot commented on GitHub (Mar 16, 2025):

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot commented on GitHub (Mar 16, 2025): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14122