A GitHub workflow is a configurable automated process defined by a YAML file stored in the .github/workflows directory of a repository. These workflows run one or more jobs on a runner machine and are triggered by events such as code pushes, pull requests, releases, or manual inputs.
Workflows consist of three primary components: events that initiate the process, jobs that execute on a runner (like ubuntu-latest), and steps which are individual scripts or reusable actions. For example, a workflow can automatically build and test code when a pull request is created or deploy an application when a release is published.
File Location: Workflows must be placed in the
.github/workflowsfolder with a.ymlor.yamlextension.Triggers: Defined using the
onkey, triggers includepush,pull_request,release,schedule, andworkflow_dispatch.Execution: Each job runs on a virtual machine (runner) and executes steps sequentially or in parallel.
Cost: GitHub Actions workflows are free for public repositories and include a monthly allowance of free minutes for private repositories.