A workflow file change in a PR does not take effect; the old behaviour runs.
IntermediateTroubleshootingWorkflows Not Triggering & Invalid Files
Answer
Likely causes → The trigger reads the workflow from the default branch: pull_request_target, workflow_run, issue_comment, schedule. Or you re-ran an old run, which reuses the original workflow file.
Diagnose → Check the trigger; check the run's commit and attempt number (gh run view <id> --json headSha,attempt).
Fix → Merge the change to the default branch for those triggers; push a new commit instead of re-running.
Prevent → Know which events use base vs head workflow definitions.
More on Workflows Not Triggering & Invalid Files
You pushed a new workflow file and nothing appears in the Actions tab.Beginner`Invalid workflow file: .github/workflows/ci.yml#L14 You have an error in your yaml syntax on line 14`Beginner`The workflow is not valid. .github/workflows/ci.yml (Line: 9, Col: 5): Unexpected value 'steps'`BeginnerThe workflow runs on push to `main` but never on pull requests.BeginnerThe "Run workflow" button for `workflow_dispatch` does not appear.BeginnerA scheduled workflow stopped running weeks ago, no errors.Beginner