Trigger a GH Action ANDing both a schedule and pushed changes

Hi all,

I’ve a large codebase, which is quite heavy and time-consuming to rebuild (yes, I should split it into smaller units, but this is the real world, where we need to live with those legacy dinosaurs). Because of that, I’d like my CI to build it once or twice a day only, and only if changes have been pushed since the last build.

Is that possible in GH Actions? I’m migrating from Travis and there that feature wasn’t available (as far as I know) there. So, so far I’ve realised it by having a build script that is called at every scheduled time and checks if there are GH changes in the last n hours (details here). This works, but has a few disadvantages: duplicated code and many builds that, while they’re not real build, they still bring up a whole VM, just to say ‘nothing to do right now’, and are reported in the CI log.

Thanks in advance