Learning center

The nightly run is green. Did it test your release branch?

No, unless the job checked out the release branch itself. GitHub runs a schedule workflow only on the latest commit of the default branch, so a nightly pass describes main on that night. Before citing a scheduled run for a release, read which commit its jobs checked out, not the branch shown on the run.

What the schedule runs#

GitHub's event reference says that "Scheduled workflows will only run on the default branch" and "run on the latest commit on the default branch". The workflow file must also exist on the default branch for the schedule to fire. Events that trigger workflows

The same section lists two ways a nightly run goes missing without any failure: runs "can be delayed during periods of high loads", and "some queued jobs may be dropped"; and in a public repository, scheduled workflows "are automatically disabled when no repository activity has occurred in 60 days". A missing night shows up only as a gap in the run list.

A public repository with a release branch#

This Android project keeps master and release branches and runs several scheduled workflows. Counting the branch of its 100 newest scheduled runs, and comparing the newest with both branch tips:

scheduled runs by head_branch (newest 100):
  master: 100
newest scheduled run: Build AVD cache 2026-12-02T07:44:31Z head_sha 5c2242e7016c success
master tip:  5c2242e7016c 2026-11-29T19:40:37Z
release tip: e6ad465ebd04 2026-11-29T19:38:34Z

Every scheduled run belongs to master, and the newest one ran on its tip. The release tip e6ad465 had push runs and no scheduled ones.

Testing another branch from a schedule#

The common workaround is a matrix that checks out each branch. The same project's watchdog workflow does this, with the release leg switched off:

matrix:
  # Release disabled until next merge
  # branch: [ "master", "release" ]
  branch: [ "master" ]
steps:
  - uses: actions/checkout@v6
    with:
      ref: ${{ matrix.branch }}

The pattern works, with two gaps. The run's head_sha and head_branch still name the default branch, so the run list says master even for the release leg. And ref: release resolves when the job starts; a release commit pushed after the night's run is not covered.

ObservationWhat it showsWhat settles the rest
Scheduled run green, no ref in checkoutThe default branch tip passedA push or manual run on the release commit
Scheduled run green, matrix leg with ref: releaseThe release tip at job start passedThe job log's checked-out SHA, compared with the commit you ship
No scheduled run last nightDelayed, dropped or disabled schedulegh workflow list --all and the run list for that workflow

Read the commit a scheduled job tested#

Print it in the job so the log records it:

- run: git log -1 --format='tested %H on %D'

Compare that SHA with the release commit. If they differ, run the workflow on the release branch, for example with gh workflow run WORKFLOW --ref release when the workflow accepts workflow_dispatch.

For how old a passing result can be before it stops counting, see production evidence freshness. Return to handing over evidence.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading