liveBook · Manning

Trigger

As explained in .NET MAUI in Action

A workflow trigger is a condition or event specification that determines when an automation workflow starts.

A workflow trigger specifies what causes a GitHub Actions workflow to start. It is configured in the YAML workflow file under the on key. section 12.2.1

Choose triggers according to how the workflow should begin:

  • Use a push trigger to run after code is pushed, optionally limiting it to selected branches such as main. section 12.2.1
  • Use a pull request or other activity trigger when workflow execution should respond to that GitHub event. section 12.2.1
  • Use workflow_dispatch when someone should start the workflow manually. section 12.2.1

Run on pushes to main or manually

name: Build and Deploy MauiStockTake on: push: branches: - main workflow_dispatch:

Listing 12.3 The build-and-deploy.yaml file
name: Build and Deploy MauiStockTake    #1
 
on:                                     #2
 
  push:                                 #3
 
    branches:                           #4
 
      - main                            #5
 
  workflow_dispatch:                    #6

Inspect the complete trigger configuration and its surrounding workflow declaration. section 12.2.1

How .NET MAUI in Action covers it

How deep it goes
Explains event choices and branch filtering with a YAML configuration, but does not detail trigger evaluation internals.
Examples
Uses a build-and-deploy workflow triggered by pushes to main or workflow_dispatch.
What it assumes
Uses basic YAML indentation and recognizes workflows as collections of jobs divided into steps.
What you can do after
Operate/configure GitHub Actions workflows to run automatically or manually under selected conditions.
How it connects
Connects workflows with YAML, jobs, pull requests, code pushes, and manual dispatch.

Also explained in

Compare how 9 books explain trigger →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.