Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 4 additions & 33 deletions workshop/04-github-actions-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,45 +82,16 @@ The agentic workflow file you'll author in this workshop is a `.md` file with th

## Label a sample workflow

The diagram below shows how the five key parts fit together in every workflow file.
Every workflow file is built from five key parts: `trigger`, `job`, `runner`, `step`, and `action`. The diagram below shows how they fit together.

<picture>
<source media="(prefers-color-scheme: dark)" srcset="images/04-actions-anatomy-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="images/04-actions-anatomy-light.svg">
<img alt="GitHub Actions workflow anatomy: trigger, job, runner, steps, and actions shown as nested layers" src="images/04-actions-anatomy-light.svg">
</picture>

Before reading on, label each highlighted part of the workflow below with its type:
`trigger`, `job`, `runner`, `step`, or `action`.

```yaml .github/workflows/hello-workflow.yml
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "All checks passed"
```

Write a label beside each line:

1. `on: [push]`
2. `test:` (the job name under `jobs:`)
3. `runs-on: ubuntu-latest`
4. `uses: actions/checkout@v4`
5. `run: echo "All checks passed"`

<details>
<summary>Reveal the labels</summary>

- `on: [push]` → **trigger** (when this workflow runs)
- `jobs: test:` → **job** (a group of steps that runs on one machine)
- `runs-on: ubuntu-latest` → **runner** (the machine type GitHub provisions)
- `uses: actions/checkout@v4` → **action** (a reusable step from the Actions marketplace)
- `run: echo "All checks passed"` → **step** (a shell command run directly on the runner)

</details>
> [!TIP]
> **Optional Side Quest:** Want to practice labeling each part of a sample workflow file and checking your answers? Work through [Side Quest: Label a Sample Workflow](side-quest-04-01-label-a-workflow.md), then come back here.

## Try it: Explore a real workflow

Expand All @@ -138,7 +109,7 @@ Open a real workflow file and find the three core building blocks — no termina
## :white_check_mark: Checkpoint

- [ ] You can identify `on`, `jobs`, and `steps` in a workflow file
- [ ] You labeled all five parts of the sample workflow above (trigger, job, runner, action, step)
- [ ] You can name the five key parts of a workflow file: trigger, job, runner, step, and action
- [ ] You know workflows live in `.github/workflows/`
- [ ] You explored a real workflow and found its trigger, a job name, and a step command
- [ ] You can describe one way agentic workflows extend classic Actions (same trigger and runner; AI agent replaces fixed shell steps)
Expand Down
1 change: 1 addition & 0 deletions workshop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ A hands-on workshop that takes you from zero to a fully automated, AI-powered wo

## Optional Side Quests

- [Label a Sample Workflow](side-quest-04-01-label-a-workflow.md) — practice labeling the trigger, job, runner, step, and action parts of a sample workflow file; branches from [Step 4](04-github-actions-intro.md).
- [Agentic Workflows for GitHub Actions Power Users](side-quest-05-01-actions-power-user.md) — one-page cheat sheet for what changes vs what stays the same in agentic workflows; branches from [Step 5](05-agentic-workflows-intro.md).
- [Agentic Workflows Deep Dive](side-quest-05-02-aw-deep-dive.md) — classification exercises, example agent output, the two-file structure, and concept checks; branches from [Step 5](05-agentic-workflows-intro.md).
- [Terminal Basics](side-quest-01-01-terminal-basics.md) — optional primer that branches from [Step 1](01-prerequisites.md).
Expand Down
63 changes: 63 additions & 0 deletions workshop/side-quest-04-01-label-a-workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!-- page-journey: all -->
<!-- page-adventure: side-quest -->
# Side Quest: Label a Sample Workflow

> _Optional: practice spotting the five building blocks of a GitHub Actions workflow before continuing with [GitHub Actions in 5 Minutes](04-github-actions-intro.md)._

## :dart: What You'll Do

You'll label the five key parts of a short Actions workflow — `trigger`, `job`, `runner`, `step`, and `action` — then check your answers. This reinforces the vocabulary from the Quick Refresher so you can read any classic workflow file with confidence.

## :clipboard: Before You Start

- You've read the Quick Refresher in [GitHub Actions in 5 Minutes](04-github-actions-intro.md) and know that `on`, `jobs`, and `steps` are the three top-level keys in a workflow file.

## Steps

The diagram below shows how the five key parts fit together in every workflow file.

<picture>
<source media="(prefers-color-scheme: dark)" srcset="images/04-actions-anatomy-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="images/04-actions-anatomy-light.svg">
<img alt="GitHub Actions workflow anatomy: trigger, job, runner, steps, and actions shown as nested layers" src="images/04-actions-anatomy-light.svg">
</picture>

Before reading on, label each highlighted part of the workflow below with its type:
`trigger`, `job`, `runner`, `step`, or `action`.

```yaml .github/workflows/hello-workflow.yml
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "All checks passed"
```

Write a label beside each line:

1. `on: [push]`
2. `test:` (the job name under `jobs:`)
3. `runs-on: ubuntu-latest`
4. `uses: actions/checkout@v4`
5. `run: echo "All checks passed"`

<details>
<summary>Reveal the labels</summary>

- `on: [push]` → **trigger** (when this workflow runs)
- `jobs: test:` → **job** (a group of steps that runs on one machine)
- `runs-on: ubuntu-latest` → **runner** (the machine type GitHub provisions)
- `uses: actions/checkout@v4` → **action** (a reusable step from the Actions marketplace)
- `run: echo "All checks passed"` → **step** (a shell command run directly on the runner)

</details>

## :white_check_mark: Checkpoint

- [ ] You labeled all five parts of the sample workflow above (trigger, job, runner, action, step)
- [ ] You can explain the difference between a `step` and an `action` in a workflow file
- [ ] You know that `runs-on:` identifies the runner, not the job name

**Return to the main adventure:** [GitHub Actions in 5 Minutes](04-github-actions-intro.md)