File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -102,12 +102,25 @@ jobs:
102102 echo "run_dashboard=true" >> $GITHUB_OUTPUT
103103 fi
104104 elif [ "${{ github.event_name }}" = "schedule" ]; then
105- # Determine based on cron schedule
106- if [ "${{ github.event.schedule }}" = "*/20 * * * *" ]; then
105+ # Use current UTC time to determine which jobs to run.
106+ # github.event.schedule is unreliable when multiple cron schedules
107+ # overlap (e.g. */20 and 0 */2 both fire at :00) — GitHub picks one
108+ # arbitrarily, causing jobs to be skipped.
109+ MINUTE=$(date -u +%-M)
110+ HOUR=$(date -u +%-H)
111+
112+ # Rebase check: every 20 minutes (minute 0, 20, or 40)
113+ if [ $((MINUTE % 20)) -lt 5 ]; then
107114 echo "run_check=true" >> $GITHUB_OUTPUT
108- elif [ "${{ github.event.schedule }}" = "0 */2 * * *" ]; then
115+ fi
116+
117+ # Dependency updates: top of every even hour
118+ if [ "$MINUTE" -lt 5 ] && [ $((HOUR % 2)) -eq 0 ]; then
109119 echo "run_update=true" >> $GITHUB_OUTPUT
110- elif [ "${{ github.event.schedule }}" = "15 */2 * * *" ]; then
120+ fi
121+
122+ # Dashboard updates: ~15 minutes after dependency updates
123+ if [ "$MINUTE" -ge 10 ] && [ "$MINUTE" -lt 25 ] && [ $((HOUR % 2)) -eq 0 ]; then
111124 echo "run_dashboard=true" >> $GITHUB_OUTPUT
112125 fi
113126 fi
You can’t perform that action at this time.
0 commit comments