The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 06:15 UTC
Throttle nightly release workflow to every 3 hours (#2134)
Julius Marminge committed
Apr 17, 2026 at 11:39 UTC
52a60678026549f8db66165e254c49eecfb69920
1 file changed
+38
-1
.github/workflows/release.yml
+38
-1
@@ -5,7 +5,7 @@ on:
5
tags:
6
- "v*.*.*"
7
schedule:
8
- - cron: "0 9 * * *"
8
+ - cron: "0 */3 * * *"
9
workflow_dispatch:
10
inputs:
11
channel:
@@ -26,8 +26,45 @@ permissions:
26
id-token: write
27
28
jobs:
29
+ check_changes:
30
+ name: Check for changes since last nightly
31
+ if: github.event_name == 'schedule'
32
+ runs-on: ubuntu-24.04
33
+ outputs:
34
+ has_changes: ${{ steps.check.outputs.has_changes }}
35
+ steps:
36
+ - name: Checkout
37
+ uses: actions/checkout@v6
38
+ with:
39
+ fetch-depth: 0
40
+
41
+ - id: check
42
+ name: Compare HEAD to last nightly tag
43
+ run: |
44
+ last_nightly_tag=$(git tag --list 'nightly-v*' --sort=-creatordate | head -n 1)
45
+ if [[ -z "$last_nightly_tag" ]]; then
46
+ echo "No previous nightly tag found. Proceeding with release."
47
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
48
+ exit 0
49
+ fi
50
+
51
+ last_nightly_sha=$(git rev-parse "$last_nightly_tag^{commit}")
52
+ head_sha=$(git rev-parse HEAD)
53
+
54
+ if [[ "$last_nightly_sha" == "$head_sha" ]]; then
55
+ echo "No changes on main since last nightly release ($last_nightly_tag). Skipping."
56
+ echo "has_changes=false" >> "$GITHUB_OUTPUT"
57
+ else
58
+ echo "Changes detected on main since $last_nightly_tag ($last_nightly_sha → $head_sha). Proceeding."
59
+ echo "has_changes=true" >> "$GITHUB_OUTPUT"
60
+ fi
61
+
62
preflight:
63
name: Preflight
64
+ needs: [check_changes]
65
+ if: |
66
+ !failure() && !cancelled() &&
67
+ (github.event_name != 'schedule' || needs.check_changes.outputs.has_changes == 'true')
68
runs-on: blacksmith-8vcpu-ubuntu-2404
69
timeout-minutes: 10
70
outputs: