Skip to content

Commit 811f5fb

Browse files
Improve step 07: add annotated YAML skeleton and expand checkpoint (#2021)
1 parent 9b6c1b6 commit 811f5fb

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

workshop/07-your-first-workflow.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,28 @@ Compile it after creating it.
3939

4040
Review the agent's edit, then continue. Prefer this path over hand-editing each line.
4141

42+
**What the agent created** — the generated file should look roughly like this:
43+
44+
```yaml
45+
---
46+
name: Daily Report Status
47+
on:
48+
schedule:
49+
- cron: "0 9 * * *" # runs every day at 09:00 UTC
50+
workflow_dispatch: {} # also allows manual runs
51+
permissions:
52+
contents: read
53+
issues: read
54+
copilot-requests: write # required to call the AI model
55+
safe-outputs:
56+
- key: create-issue # the only write action the agent may perform
57+
---
58+
59+
Generate an activity report for this repository and post it as a new issue.
60+
```
61+
62+
The **frontmatter** tells GitHub Actions when to run, what permissions the agent has, and which write action it may use (`create-issue`). The **task brief** below the second `---` is what the AI agent reads and acts on.
63+
4264
<picture>
4365
<source media="(prefers-color-scheme: dark)" srcset="images/07a-workflow-dispatch-trigger-dark.svg">
4466
<source media="(prefers-color-scheme: light)" srcset="images/07a-workflow-dispatch-trigger-light.svg">
@@ -69,9 +91,11 @@ For follow-up edits, keep using an agent with the `agentic-workflows` skill and
6991

7092
## ✅ Checkpoint
7193

72-
- [ ] `.github/workflows/daily-report-status.md` includes `permissions` with `copilot-requests: write`
73-
- [ ] `gh aw compile` reports valid
94+
- [ ] `.github/workflows/daily-report-status.md` exists and contains an `on: schedule:` trigger in the frontmatter
95+
- [ ] The file includes `permissions` with `copilot-requests: write`
96+
- [ ] `gh aw compile` exits with no errors and produces `daily-report-status.lock.yml`
7497
- [ ] Both `daily-report-status.md` and `daily-report-status.lock.yml` are committed and pushed to `main`
98+
- [ ] The workflow appears in the **Actions** tab of your repository under "Daily Report Status"
7599
- [ ] You are ready to choose the workflow's billing and authentication method
76100

77101
<!-- journey: all -->

0 commit comments

Comments
 (0)