GitHub Actions "Workflow file changed during run"
A run executes the version of the workflow that existed when it was triggered. Editing or re-pushing the workflow while a run is in flight can invalidate the run or cause confusing behavior on re-run.
What this error means
A run fails or behaves inconsistently after the workflow file was modified mid-run, or a re-run picks up a different definition than expected.
The workflow file was modified during the run; re-running may use a different definition.Common causes
Workflow edited mid-run
Pushing a change to the workflow while it runs alters the on-disk definition.
Re-run after a definition change
Re-running a failed job after editing the workflow can use the newer file.
How to fix it
Avoid editing live workflows
- Let in-flight runs complete before changing the workflow file.
- Iterate on a separate branch to avoid disturbing active runs.
- Re-trigger a fresh run rather than re-running across a definition change.
# Iterate on a branch; merge once stable
git switch -c ci/iterate
# edit .github/workflows/ci.yml, push, open PRHow to prevent it
- Develop workflow changes on a branch and merge when stable.
- Avoid pushing workflow edits while runs are in progress.