-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Description
Description
Hello,
As stated in the title, I tested push, schedule, and workflow_dispatch triggers with the following workflow:
name: test
run-name: ${{ format('test ({0})', gitea.event_name) }}
on:
schedule:
- cron: "*/2 * * * *"
push:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6The results are as follows, when triggered by schedule, gitea.event_name is empty
I have do some simple analysis, and it might be caused by the fact that the ActionRun object generated by the ToActionRun function (introduced in #34301) does not set the TriggerEvent field. In theory, explicitly setting it to webhook_module.HookEventSchedule should work.
https://github.com/go-gitea/gitea/blob/main/models/actions/utils.go#L87
I'm not familiar with Golang and Gitea's implementation, and I currently lack a Golang development environment and enough time, so I'm merely raising the issue and a possible reason. If someone could fix it, it would be greatly appreciated.
Gitea Version
1.25.4
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?
Docker
Database
SQLite