ci: stop restarters-dev nightly to save cost#889
Open
edwh wants to merge 2 commits into
Open
Conversation
Adds a scheduled GitHub Actions workflow that stops the restarters-dev Fly machine(s) every night at 02:00 UTC. auto_stop_machines is "off" so Fly won't undo the stop, and auto_start_machines is true so the box boots again on the next request in the morning. Reuses the existing FLY_API_TOKEN repo secret. Off overnight (no CPU billing), back on demand; the volume persists so no data is lost. Also runnable manually via workflow_dispatch. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| stop-dev: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: superfly/flyctl-actions/setup-flyctl@master |
Pin superfly/flyctl-actions/setup-flyctl from @master to the full commit SHA ed8efb3 (master as of 2026-07-03). Satisfies SonarCloud's new_security_rating gate (rule githubactions:S7637 — pin actions to a full-length commit SHA to prevent a moving tag/branch from silently introducing malicious code).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Adds a scheduled GitHub Actions workflow that stops the
restarters-devFly machine(s) every night at 02:00 UTC so we don't pay for the dev/staging box while it's idle overnight.Why it's safe / how it works
fly.dev.tomlhasauto_stop_machines = "off"→ Fly won't auto-stop the box during the day, and won't auto-restart a machine we stop here (min_machines_runningis only enforced when autostop is enabled, so it's inert — verified: a manualfly machine stopstayed stopped).fly.dev.tomlhasauto_start_machines = true→ the machine boots again automatically the first time anyone hits it in the morning (verified: a request cold-started it back tostarted).Net effect: off overnight (no CPU billing), back on demand.
Reuses the existing
FLY_API_TOKENrepo secret. Also runnable on demand via workflow_dispatch (Actions tab → Run workflow).Note on time zone
GitHub Actions cron is UTC and doesn't follow BST/DST:
0 2 * * *= 02:00 UTC = 03:00 London in summer (BST) / 02:00 in winter. Nudge the cron if you want exactly 02:00 London year-round.🤖 Generated with Claude Code