liveBook · Manning

Workflow

As explained in Road to Kubernetes

A workflow is an automated definition of triggers, jobs, and steps that performs tasks in a software repository.

A workflow is a repository-stored definition that tells GitHub Actions when to run and what jobs and steps to execute. It can run on demand or automatically, such as after a push. section 4.1.1

To create one, place a YAML file in `.github/workflows/`, then commit and push it to GitHub. GitHub Actions runs the defined code on its servers. section 4.1.1

Listing 4.2 Hello World with GitHub Actions
name: Hello World
on:
  workflow_dispatch:
  push:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Hello World
      run: echo "Hello World"

A minimal workflow configures manual and push triggers, a build job, and steps to check out the repository and print a greeting. section 4.1.1

How Road to Kubernetes covers it

How deep it goes
Defines triggers, a job, and steps through a Hello World example, including where the workflow file belongs.
Examples
Uses a Python repository and a Hello World workflow that checks out code and runs an echo command.
What it assumes
Assumes a GitHub repository and introduces the required workflow-file location and YAML configuration.
What you can do after
Build it from scratch by writing, committing, and pushing a basic GitHub Actions workflow.
How it connects
Connects workflows to GitHub Actions, YAML configuration, and continuous integration and delivery tools.

Also explained in

Compare how 7 books explain workflow →

Related concepts

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