The workflow syntax
The first thing you will see in your workflow file is its name, which is displayed under Actions in your repository:
name: My first workflow
This name is followed by triggers.
Workflow triggers
Triggers are the values for the on
key:
on: push
Triggers can contain multiple values:
on: [push, pull_request]
Many triggers contain other values that can be configured:
on:
push:
branches:
- main
- release/**
pull_request:
types: [opened, assigned]
There are three types of triggers:
- Webhook events
- Scheduled events
- Manual events
Webhooks events are what you have seen so far. There are webhook events for nearly everything: if you push code to GitHub (push
), if you create or update a pull request (pull_request
), or if you create or modify an issue (issues
). For...