We can develop workflows that focus on specific branches or only run under certain circumstances. In this video, learn how to use conditionals to add logic to your workflow.
- [Instructor] When we use the push and pull request events … to trigger our workflow, we can limit activity … to specific branches. … To set this up, we need to change our YAML formatting a bit. … Instead of using a value for the on key as we see here, … the event needs to be in its own YAML block. … Basically, we move the event down to the next line … and follow it with a colon to indicate a new block … with its own mapping. … Now we can add the branches conditional … where we can list the branches … we want the workflow to focus on. … For example, if we want pushes to our repo … to only work on the branches named develop and master, … we would add a dash and then list those branch names. … If we want pull requests to only work on our master branch, … we would add a list entry with master … under the pull request attribute. … Now these examples would be for workflows … that only have one trigger, a push or a pull request. … What if we have a workflow … that's triggered by both of these events? …
- Creating an action
- Creating a workflow
- Adding actions to a workflow
- Using an action from a repository
- Developing a CI/CD pipeline with GitHub Actions
- Building custom actions
- Publishing an action to the GitHub Marketplace
Skill Level Beginner
1. Your First Action
Your first Action2m 31s
2. Connecting Actions with Workflows
3. Using Actions
4. Developing a CI/CD Workflow
5. Building Custom Actions
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.