Skip to content

Commit b689cd4

Browse files
committed
docs: add GHCR container auth requirement to skill references
- Add steps: frontmatter field docs with GHCR login pattern - Add container authentication section to tools-reference - Add silent container pull failure to validation errors, anti-patterns, and checklist - Add critical rule #12 for GHCR login requirement
1 parent 154b5b9 commit b689cd4

4 files changed

Lines changed: 55 additions & 0 deletions

File tree

skills/aw-author/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,4 @@ These rules apply across ALL modes:
382382
9. **All workflow-created items** include a hidden `<!-- gh-aw-workflow-id: NAME -->` marker
383383
10. **`read-all` permission shorthand** expands to read on all permission scopes
384384
11. **`event.json` fallback** — when `${{ github.event }}` is unavailable, agents should check for `event.json` in the workspace
385+
12. **Container-based MCP servers from `ghcr.io` require a GHCR login step** — add a `steps:` block with `docker login ghcr.io` using `${{ github.token }}` before `safe-outputs:`, or container pulls fail silently

skills/aw-author/references/frontmatter-schema.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,38 @@ safe-outputs:
192192
append-only-comments: true
193193
```
194194

195+
## Steps (`steps:`)
196+
197+
Pre-agent setup steps that run before the agentic workflow starts. These compile into GitHub Actions job steps that execute before the agent is invoked.
198+
199+
```yaml
200+
steps:
201+
- name: Login to GitHub Container Registry
202+
run: echo "${{ github.token }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
203+
```
204+
205+
### When Steps Are Required
206+
207+
**Container-based MCP servers pulling from ghcr.io require GHCR authentication.** Without a login step, container pulls fail silently at runtime. This is the most common cause of container-based workflow failures.
208+
209+
If your workflow uses `mcp-servers:` with a `container:` field referencing `ghcr.io`, you **must** include a GHCR login step:
210+
211+
```yaml
212+
mcp-servers:
213+
my-server:
214+
container: ghcr.io/org/image:latest
215+
env:
216+
TOKEN: "${{ secrets.VALUE }}"
217+
218+
steps:
219+
- name: Login to GitHub Container Registry
220+
run: echo "${{ github.token }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
221+
```
222+
223+
The `steps:` block is placed after `mcp-servers:` (or after `tools:` if no MCP servers) and before `safe-outputs:`.
224+
225+
---
226+
195227
## Network Configuration (`network:`)
196228

197229
```yaml

skills/aw-author/references/tools-reference.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,28 @@ mcp-servers:
278278
allowed: ["send_message", "get_channel_history"]
279279
```
280280

281+
### Container Authentication (GHCR)
282+
283+
**CRITICAL:** When using `container:` with images hosted on GitHub Container Registry (`ghcr.io`), you **must** add a GHCR login step in the `steps:` block. Without this, container pulls fail silently at runtime.
284+
285+
```yaml
286+
mcp-servers:
287+
datadog:
288+
container: ghcr.io/org/datadog-mcp:latest
289+
env:
290+
DD_API_KEY: "${{ secrets.DD_API_KEY }}"
291+
292+
steps:
293+
- name: Login to GitHub Container Registry
294+
run: echo "${{ github.token }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
295+
```
296+
297+
This applies to **all** container-based MCP servers pulling from `ghcr.io`, regardless of whether the image is public or private. The `github.token` is automatically available and has sufficient scope for package reads.
298+
281299
### Key Constraints
282300

283301
- Tool declarations merge from imported components
284302
- GitHub App tokens auto-revoke after workflow completion
285303
- Lockdown mode auto-enables for public repos with custom tokens
286304
- The `registry` field is informational and doesn't affect execution
305+
- Container-based MCP servers from `ghcr.io` require a GHCR login step (see above)

skills/aw-author/references/validation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Occur during GitHub Actions execution.
4949
- **Bash command blocked:** Attempting a command not in the allowlist
5050
- **Network blocked:** External URL access when no `network` configuration
5151
- **MCP server connection failed:** Server not available, wrong args, missing env vars
52+
- **Container pull failed (silent):** Container-based MCP servers from `ghcr.io` fail silently if no GHCR login step is present. Add a `steps:` block with `docker login ghcr.io` using `${{ github.token }}`
5253

5354
### Permission Errors
5455
- **Token insufficient:** `GITHUB_TOKEN` lacks required scope
@@ -114,6 +115,7 @@ The workflow runs but produces incorrect or unexpected results.
114115
| No `close-older-issues` on reports | Issue accumulation | Enable auto-cleanup |
115116
| Overlapping triggers | Double-processing | Use distinct event types |
116117
| `container:` with non-Docker value | Compilation error | Use valid Docker image reference |
118+
| `container: ghcr.io/…` without GHCR login step | Silent runtime failure | Add `steps:` with `docker login ghcr.io` |
117119

118120
### Prose Anti-Patterns
119121

@@ -150,6 +152,7 @@ When a workflow fails, check in this order:
150152
- [ ] Bash allowlist covers required commands
151153
- [ ] MCP servers have correct env vars and args
152154
- [ ] Network config allows required external domains
155+
- [ ] Container-based MCP servers from `ghcr.io` have a GHCR login step in `steps:`
153156

154157
### 4. Safe-Outputs
155158
- [ ] Every write operation in prose has a matching safe-output

0 commit comments

Comments
 (0)