|
6 | 6 |
|
7 | 7 | This step has two entry points: |
8 | 8 |
|
9 | | -- **Arriving from the step 07 access check (error recovery):** You have completed [Install the gh-aw CLI Extension](06-install-gh-aw.md) and pushed `.github/skills/agentic-workflows/`. Workflow files do not need to exist yet — fix model access first, then return to [Write Your First Agentic Workflow](07-your-first-workflow.md) to continue. |
| 9 | +- **Arriving from step 07 (error recovery):** Workflow files do not need to exist yet — fix model access first, then return to [Write Your First Agentic Workflow](07-your-first-workflow.md). |
10 | 10 | - **Arriving as the next step after step 07 (normal flow):** `daily-report-status.md` and `daily-report-status.lock.yml` are committed to your practice repository. |
11 | 11 |
|
12 | 12 | ## :dart: What You'll Do |
13 | 13 |
|
14 | | -You'll verify Copilot model access with a quick test that uses the `agentic-workflows` skill, then choose the [billing](https://github.github.com/gh-aw/reference/billing/) and [authentication](https://github.github.com/gh-aw/reference/auth/) method for the first workflow, configure it, and confirm the source and lock files agree before you continue to [Step 8](08-run-your-workflow.md). |
| 14 | +You'll run a one-sentence test prompt, confirm Copilot is reachable, choose your [billing](https://github.github.com/gh-aw/reference/billing/) path, and configure the workflow before continuing to [Step 8](08-run-your-workflow.md). |
15 | 15 |
|
16 | | -## Verify model access with a test prompt |
| 16 | +## Verify model access |
17 | 17 |
|
18 | | -Before configuring billing, confirm Copilot is reachable from this repository. |
19 | | -Catching an access problem here saves debugging time in the billing steps and in Step 8. |
20 | | - |
21 | | -1. In the terminal that is already open in your Codespace, run: |
| 18 | +1. In the terminal already open in your Codespace, run: |
22 | 19 |
|
23 | 20 | ```bash |
24 | 21 | gh copilot |
25 | 22 | ``` |
26 | 23 |
|
27 | | -1. Send the following prompt in Copilot CLI: |
| 24 | +1. Send this prompt: |
28 | 25 |
|
29 | 26 | ```prompt |
30 | 27 | /agentic-workflows what trigger does a scheduled workflow use? |
31 | 28 | ``` |
32 | 29 |
|
33 | | -1. Confirm you receive a reply. Any response means the model and skill are accessible. |
34 | | -2. If you see an error, check [github.com/settings/copilot](https://github.com/settings/copilot) to confirm Copilot is enabled on your account, then return here. |
| 30 | +1. Any reply confirms the model and skill are accessible. Continue to **Choose a billing path**. |
35 | 31 |
|
36 | 32 | > [!IMPORTANT] |
37 | | -> Do not continue if you received an error instead of a response. Fix the access issue now — model-access errors will cause Step 8 to fail and are much harder to diagnose mid-run. Check [github.com/settings/copilot](https://github.com/settings/copilot) first, then see [Side Quest: Configure GitHub Copilot for Agentic Workflows](side-quest-06-03-copilot-token.md) if the problem persists. |
38 | | -
|
39 | | -## Pre-flight troubleshooting decision tree |
40 | | - |
41 | | -Use this quick check before you choose a billing path: |
| 33 | +> If you see an error instead of a reply, check [github.com/settings/copilot](https://github.com/settings/copilot) to confirm Copilot is enabled. If the problem persists, see [Side Quest: Configure GitHub Copilot for Agentic Workflows](side-quest-06-03-copilot-token.md), then return here. |
42 | 34 |
|
43 | | -- **You receive a normal reply in Copilot CLI** |
44 | | - - If you arrived here from the step 07 access check (before creating workflow files), return to [Write Your First Agentic Workflow](07-your-first-workflow.md) and continue from where you left off. |
45 | | - - Otherwise, continue to **Choose one Copilot billing path**. |
46 | | -- **You receive an access or entitlement error** |
47 | | - - Confirm Copilot is enabled for your account at [github.com/settings/copilot](https://github.com/settings/copilot). |
48 | | - - If your repository is in an organization, ask your org admin to confirm your Copilot seat and policy access. |
49 | | - - Retry the same one-sentence prompt in Copilot CLI. |
50 | | -- **You still cannot get a reply after account checks** |
51 | | - - Pause here and complete [Side Quest: Configure GitHub Copilot for Agentic Workflows](side-quest-06-03-copilot-token.md), then return to this step. |
| 35 | +If you arrived from the step 07 access check and the test prompt succeeded, return to [Write Your First Agentic Workflow](07-your-first-workflow.md) now. |
52 | 36 |
|
53 | 37 | <picture> |
54 | 38 | <source media="(prefers-color-scheme: dark)" srcset="images/07d-preflight-troubleshoot-dark.svg"> |
55 | 39 | <source media="(prefers-color-scheme: light)" srcset="images/07d-preflight-troubleshoot-light.svg"> |
56 | 40 | <img alt="Pre-flight troubleshooting decision tree: send a test prompt, then follow YES or NO branches to either continue the workshop or fix model access" src="images/07d-preflight-troubleshoot-light.svg"> |
57 | 41 | </picture> |
58 | 42 |
|
59 | | -## Confirm the workflow engine |
60 | | - |
61 | | -Open `.github/workflows/daily-report-status.md`. The Step 7 workflow has no `engine:` line, so it uses GitHub Copilot. |
62 | | - |
63 | | -Claude and Codex are optional [engines](https://github.github.com/gh-aw/reference/engines/) introduced in later side quests. You do not need an Anthropic or OpenAI API key for this first run. |
64 | | - |
65 | | -If you are working in Claude Code or OpenAI Codex, keep this first workflow on Copilot and switch later if you want: |
66 | | - |
67 | | -- **Claude Code:** use [Side Quest: Configure an Anthropic API Key](side-quest-11-06-anthropic-key.md). |
68 | | -- **OpenAI Codex:** use [Side Quest: Configure an OpenAI API Key](side-quest-11-07-openai-key.md). |
69 | | - |
70 | | -## Choose one Copilot billing path |
71 | | - |
72 | | -Choose exactly one method. The diagram below shows both paths and the key configuration difference between them. |
73 | | - |
74 | | -<details> |
75 | | -<summary><b>Plain-language billing summary</b></summary> |
76 | | - |
77 | | -- **Choose organization centralized billing** when the repository's organization already pays for Copilot in GitHub Actions. Keep `copilot-requests: write`. Do not add a `COPILOT_GITHUB_TOKEN` secret. |
78 | | -- **Choose personal billing** when this is your personal repository, or when the organization does not pay for Copilot in GitHub Actions. Remove `copilot-requests: write`, then add a `COPILOT_GITHUB_TOKEN` secret in the repository's **Settings** → **Secrets and variables** → **Actions** page. |
79 | | -- **If you are not sure which path applies, ask one question:** "Is centralized Copilot billing for GitHub Actions enabled for this repository?" If the answer is "no" or "I don't know," follow the personal billing path until an admin confirms otherwise. |
80 | | - |
81 | | -</details> |
82 | | - |
83 | | -<picture> |
84 | | - <source media="(prefers-color-scheme: dark)" srcset="images/07d-billing-path-decision-dark.svg"> |
85 | | - <source media="(prefers-color-scheme: light)" srcset="images/07d-billing-path-decision-light.svg"> |
86 | | - <img alt="Decision flow for choosing Copilot billing path: organization centralized billing or personal billing" src="images/07d-billing-path-decision-light.svg"> |
87 | | -</picture> |
88 | | - |
89 | | -### Billing quick-reference |
90 | | - |
91 | | -Use this table first, then follow the detailed steps for your selected path below. |
92 | | - |
93 | | -| If this is true | Choose this path | Key setting | |
94 | | -|---|---|---| |
95 | | -| Your organization provides centralized Copilot billing for Actions | **Organization with centralized Copilot billing** | Keep `copilot-requests: write`; no `COPILOT_GITHUB_TOKEN` secret | |
96 | | -| You are in a personal repo, or your org does not provide centralized billing | **Personal billing** | Remove `copilot-requests: write`; configure `COPILOT_GITHUB_TOKEN` | |
97 | | - |
98 | | -### Organization with centralized Copilot billing |
99 | | - |
100 | | -Use this path when the organization that owns the repository has centralized Copilot billing enabled for Actions. |
101 | | - |
102 | | -1. Ask your organization administrator to confirm centralized billing is enabled. |
103 | | -2. Open `daily-report-status.md` and confirm the `permissions:` block includes `copilot-requests: write`: |
104 | | - |
105 | | -```markdown .github/workflows/daily-report-status.md |
106 | | ---- |
107 | | -permissions: |
108 | | - contents: read |
109 | | - copilot-requests: write |
110 | | ---- |
111 | | -``` |
112 | | - |
113 | | - This line is already present in the workflow template. Do not remove it. |
114 | | -3. No repository secret is needed for this path. |
115 | | -4. Recompile and commit the lock file from your terminal so it reflects the confirmed configuration: |
116 | | - |
117 | | -```bash |
118 | | -gh aw compile |
119 | | -git add . |
120 | | -git commit -m "chore: confirm lock file is current" && git push |
121 | | -``` |
122 | | - |
123 | | -The workflow uses the organization subscription. If you see `401 Unauthorized` in the run log, see [Method 1: Copilot Requests Permission](side-quest-06-03a-copilot-requests-permission.md) for troubleshooting. |
124 | | - |
125 | | -### Personal billing |
126 | | - |
127 | | -Use this path for a personal repository, or when the owning organization does not provide centralized Copilot billing. |
128 | | - |
129 | | -> [!IMPORTANT] |
130 | | -> When `copilot-requests: write` is present, the workflow ignores `COPILOT_GITHUB_TOKEN` for inference. Remove the permission before you set up the secret, then recompile. |
131 | | -
|
132 | | -1. Remove `copilot-requests: write` from `daily-report-status.md`. |
133 | | -2. Generate a fine-grained PAT with **Copilot requests: Read-only** in [github.com/settings/tokens](https://github.com/settings/tokens). |
134 | | -3. In your repository, open **Settings** → **Secrets and variables** → **Actions**. |
135 | | -4. Add a new repository secret named `COPILOT_GITHUB_TOKEN` and paste the PAT value. |
136 | | -5. Recompile and commit `daily-report-status.lock.yml`. |
137 | | - |
138 | | -For the full browser walkthrough, see [Method 2 (UI-only): `COPILOT_GITHUB_TOKEN`](side-quest-06-03c-copilot-github-token-ui-only.md). If you prefer terminal setup, use [Method 2: `COPILOT_GITHUB_TOKEN` secret](side-quest-06-03b-copilot-github-token.md). |
139 | | - |
140 | | -## Check the final configuration |
| 43 | +## Choose a billing path |
141 | 44 |
|
142 | | -Open `daily-report-status.md` and confirm it matches the method you selected: |
| 45 | +> [!NOTE] |
| 46 | +> For golden-ticket workshops, billing is pre-provisioned by your org. Use the **Organization centralized billing** path unless your instructor says otherwise. |
143 | 47 |
|
144 | | -| Billing path | `copilot-requests: write` | Required secret | |
145 | | -|---|---|---| |
146 | | -| Organization centralized billing | Present | None | |
147 | | -| Personal billing | Removed | `COPILOT_GITHUB_TOKEN` | |
| 48 | +Follow the full setup steps in [Side Quest: Copilot Billing Paths](side-quest-07d-billing-paths.md), then return here once your workflow file and lock file are committed. |
148 | 49 |
|
149 | | -## ✅ Checkpoint |
| 50 | +## :white_check_mark: Checkpoint |
150 | 51 |
|
151 | | -- [ ] I opened Copilot CLI in the terminal and sent a test prompt |
152 | | -- [ ] I received a response from the model and the `agentic-workflows` skill |
| 52 | +- [ ] I sent the test prompt in Copilot CLI and received a reply |
153 | 53 | - [ ] I confirmed no access errors appeared |
154 | | -- [ ] I confirmed the first workflow uses GitHub Copilot |
155 | | -- [ ] I used the agent + `agentic-workflows` guidance to improve workflow design decisions |
156 | | -- [ ] I chose organization centralized billing or personal billing |
157 | | -- [ ] I completed all configuration steps for my chosen billing path (inline above — no side-quest visit required) |
158 | | -- [ ] My source and compiled lock file use the selected method |
159 | | -- [ ] Both workflow files are committed to `main` |
| 54 | +- [ ] I chose a billing path and completed all configuration steps |
| 55 | +- [ ] My source file and compiled lock file reflect the chosen method |
| 56 | +- [ ] Both files are committed to `main` |
160 | 57 | - [ ] I am ready for [Run and Watch Your Workflow](08-run-your-workflow.md) |
161 | 58 |
|
162 | 59 | <!-- journey: all --> |
|
0 commit comments