Replies: 16 comments 13 replies
-
One approach would be to use nektos/act -- have the schedule check out the branch and then tell it which workflow(s) to run. Alternatively, it's possible that you can do what you want with a reusable workflow: |
Beta Was this translation helpful? Give feedback.
-
Same issue, a bit different use-case. |
Beta Was this translation helpful? Give feedback.
-
I need this feature too: I'm trying to compare two GCs for a JVM program, Pr0methean/OcHd-KotlinBuild@db17068 (Shenandoah) and Pr0methean/OcHd-KotlinBuild@65871e5 (ZGC), and launching them at different times of day or days of the week could easily bias the results. The only alternative solution I can come up with involves willingly regressing mainline for several days while I learn which commit executes its CI/CD faster. |
Beta Was this translation helpful? Give feedback.
-
also struggling to move a very simple pipeline from Jenkins to GHA... something like: on:
schedule:
- cron: '*/5 * * * *'
branches:
- Dev
- Int |
Beta Was this translation helpful? Give feedback.
-
GitHub is currently asking for feedback on Actions (just click on the Actions tab on any of your projects). I just gave them feedback about this topic. Hope it has an effect. |
Beta Was this translation helpful? Give feedback.
-
Is there any solution so far to define branches on schedule trigger as we do it on push trigger for example? |
Beta Was this translation helpful? Give feedback.
-
Just adding a +1 for this feature. Surprised it isn't already there. |
Beta Was this translation helpful? Give feedback.
-
Yes this would be very useful, especially if you have maintenance branches. |
Beta Was this translation helpful? Give feedback.
-
I need this too |
Beta Was this translation helpful? Give feedback.
-
I need this too |
Beta Was this translation helpful? Give feedback.
-
Same same :) |
Beta Was this translation helpful? Give feedback.
-
plus 1 for this feature |
Beta Was this translation helpful? Give feedback.
-
+1. |
Beta Was this translation helpful? Give feedback.
-
+1 |
Beta Was this translation helpful? Give feedback.
-
I'm migrating my pipeline from Gitlab to Github, and knowing that in Gitlab you are specifying branch, environment variables, enabled/disabled and even Cron time zone, all of this on the same UI form, it feels so easy in Gitlab compared to what you have to do in Github... And then you can click "Play button" to run it manually I wish there were product managers in Github who review other products to understand what customers may struggling for |
Beta Was this translation helpful? Give feedback.
-
Right now it's just not possible to run scheduled builds for non-default branches.
I am not talking about checking out another branch from a workflow defined in the default branch:
Even if you check out the branch, you still run the "current" workflow of the default branch where that checkout step is defined.
There is a discussions going on and I think this comment describes very well why checkout alone won't help.
The problem for us is that we have a workflow defined in a non-default branch that runs on
pull_request
andpush
events, which is working fine, however we also want to run the same tests for that branch scheduled, each night as well. This way we can run the same tests + additional, more thorough, tests, which take much longer, each night (by conditionally checkingif: github.event_name == 'schedule'
).Right now the only, very dirty, workaround is to copy a workflow defintion file from a non-default branch to the default branch and use the workaround to check out non-default branch like shown in the snippet above.
Maintaining two exact same copies of the same workflow is very cumbersome as you can imagine and its very likely they become out of sync at some point.
I can imagine and understand that there are technical limitations of checking every branch in every repo for scheduled workflows, however if you give repo admins a setting page where they can define additional branches, besides the default branch, where GitHub should look for scheduled workflows that should be enough. Instead of a settings page you could also offer a new workflow syntax. E.g. something like
.github/workflows/scheduled.yml
:(Just an idea 😉)
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions