One workflow for a weekly video: render, wait 60 minutes, publish
We replaced two scheduled GitHub Actions workflows that had to run in the right order with one workflow that a published page starts, waits 60 minutes, and then sends. Every week we turn the Weekly Radar into a short video and post it to YouTube Shorts and X. This log covers what broke on November 8, 2026, the three changes we made the same day, and how the result behaved in its first runs. The timings below come from the GitHub Actions runs; the references at the end name the records.
Background
The job had two workflows. One ran every Sunday at 09:00 (Japan time): it wrote the script from the week's Radar, rendered the video and opened an issue so the owner could look at it. A second one ran at 10:00 and published the video to YouTube and X, unless the owner had put a hold label on the issue. The hour in between was the owner's window to stop a bad video.
On November 8 the 09:00 run started late. The 10:00 run only checked whether the latest video run had finished, found nothing running yet, looked for that day's issue, did not find it, and failed. Nothing was published that week until the owner started it by hand.
Options we weighed
- Keep two schedules and widen the gap. It makes the failure rarer, not impossible: the two runs still do not know about each other.
- Make the second workflow wait for the first. It needs polling, and a waiting job holds a runner for the whole hour.
- One workflow with a pause inside. Rendering, the review window and publishing become jobs of one run, so the issue number and the video pass from job to job. GitHub environments can hold a job with a wait timer without using a runner while it waits. We chose this.
What we did
1. One flow. The video workflow gained a hold job that runs in an environment with a 60-minute wait timer, followed by a publish job that calls the old publishing workflow as a reusable workflow, handing over the issue number and the video artifact from the same run. The hold label check stays right before sending. The hold job also measures how long it actually waited and refuses to continue if it was less than 55 minutes, so a missing or mistyped timer stops the run instead of skipping the review window. A run started by hand does not publish on its own unless automatic publishing is switched on for it.
2. Started by the content, not by the clock. After the merge, the new Sunday schedule did not run at 10:07 either. Rather than depend on the schedule, we start the workflow when there is something to publish: our site already serves the date of the latest Radar as JSON, and the automation that watches our repositories (it runs while a maintainer has a session open) reads it. When the date is new and there is no review issue for it yet, it starts the workflow with automatic publishing on. Before starting, it records a claim so a crash cannot start the same week twice, and it only fetches from hosts listed in our own product list, without following redirects.
3. Close the review issue when everything is sent. Each destination leaves a marker comment on the issue with the first 16 hex characters of the video's SHA-256. After a successful live run, the workflow closes the issue only if every enabled destination has a marker for the current video. A partial failure leaves it open.
Results
| Run | What happened |
|---|---|
| November 8, first run of the new flow (started by hand, automatic publishing on) | Script and video: 12 min 50 s. The hold job started 60 min 3 s after that and passed. Publishing to YouTube and X took 48 s. |
| November 8, first trigger attempt | Reading the Radar date failed with HTTP 403: Cloudflare refused the default Python user agent. Sending a named user agent fixed it. |
| November 9, test of the new two-speaker video | Published to both destinations; the review issue closed by itself. |
Lessons learned
- Two schedules are an implicit dependency. If one job needs the output of another, put them in one run and pass the output explicitly.
- A scheduled time is a wish. In our runs the schedule was late once and did not fire once. A trigger tied to the content you publish is easier to reason about.
- Make a safety pause fail closed. Checking the time actually waited costs a few lines and turns a configuration mistake into a stopped run rather than an unreviewed post.
- "Done" needs evidence per destination. Closing the issue from per-destination markers tied to the video's hash tells us exactly which video reached where.
Next steps
The trigger only runs while a maintainer session is open, which is a deliberate choice: nothing publishes while nobody is around to stop it. We will see over the next weeks whether that is enough, and the first fully unattended week will show whether the 60-minute window is the right length.
References
- GitHub Docs: Deployments and environments (wait timer)
- GitHub Docs: Reusing workflows
- GitHub Docs: Events that trigger workflows (schedule)
Our own records (private repositories, named here so the claims above can be traced):
- ziv-labs/ziv-distribution #113, PR #114 — the failure on November 8 and the merge into one workflow with the 60-minute hold
- ziv-labs/ziv-distribution #115, PR #116 — starting the workflow from the published Radar instead of a schedule
- ziv-labs/ziv-distribution #120, PR #121 — closing the review issue when every destination has a marker for the current video
- ziv-labs/agentic-factory-vnext #290, PR #291, #294 — the trigger in the repository watcher; the user agent Cloudflare accepts
- ziv-labs/ziv-distribution Actions run of November 8 (02:36 UTC) — the timings: 12 min 50 s, 60 min 3 s hold, 48 s publish
- ziv-labs/ziv-distribution #146 — the November 9 test: sent to YouTube and X, issue closed automatically
Related notes
- Importing live Cloudflare and GitHub settings into OpenTofu without changing them — How we moved a DNS zone, R2, Pages, D1 and ten GitHub repositories from dashboards into OpenTofu with zero-change import plans: the decisions, the plan results, where the generator fell short, and the rules we follow now.