-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitea.event_name set to push when running scheduled #27667
Comments
I see this as well.
Cross-referencing the implementation PR: Not entirely sure, but it looks like a So it is returned here: |
I test main branch with yaml: on:
schedule:
- cron: "*/5 * * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Make some test files
run: |
echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." |
So maybe it's a 1.21-only problem. |
I see this as well. gitea v1.21.1
It seems the issue is with having two triggers, one on push and one on schedule. |
In the |
Build via "push":
Build via "schedule":
|
I have the same Problem. For testing I created a new Repo with the following workflow: .github/workflows/test.yml:
It never gets executed.
After this the first workflow is executed every 2 minutes. |
Close this issue since the bug has been fixed by #28691 |
Description
I have a workflow that runs both on push and on a cron schedule. When I echo
${{ gitea.event_name }}
though it showspush
both when I push it out and when it runs due to the schedule. From what I can tell, GitHub sets theevent_name
toschedule
when running from a schedule so I expected Gitea to work similarly.Is this a bug? If not, is there an alternate means to have a workflow detect which trigger it is running under?
Gitea Version
1.21.0-rc1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
2.40
Operating System
alpine:latest
How are you running Gitea?
Gitea self-built and running on a docker image. Recently "updated" from 1.20.5 to 1.21.0-rc1 to for the cron actions.
Database
SQLite
The text was updated successfully, but these errors were encountered: