Quick answer

Every GitHub Actions workflow must define when it runs using the top-level 'on' key.

GitHub Actions Missing 'on'

Every GitHub Actions workflow must define when it runs using the top-level 'on' key. Without it, the workflow is invalid.

Common causes

How to fix

FAQ

What events can I use in GitHub Actions 'on'?
Common events: push, pull_request, workflow_dispatch, schedule, repository_dispatch. See GitHub docs for the full list.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical