Skip to content
Merged
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
18 changes: 18 additions & 0 deletions docs/src/content/docs/reference/safe-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1631,6 +1631,24 @@ safe-outputs:
github-token: ${{ secrets.PR_PAT }} # per-output
```

`github-token` accepts these GitHub Actions expression forms:

- `secrets.NAME`
- `needs.<job>.outputs.<name>`
- `steps.<id>.outputs.<name>`

The `steps.*.outputs.*` form is useful when the safe-outputs job mints a short-lived token in `pre-steps:` or `setup-steps:` and then reuses that token for `Process Safe Outputs` in the same job.

```yaml wrap
pre-steps:
- id: fetch_token
run: echo "token=${TOKEN}" >> "$GITHUB_OUTPUT"

safe-outputs:
github-token: ${{ steps.fetch_token.outputs.token }}
create-pull-request:
```

### Using a GitHub App for Authentication (`github-app:`)

Use GitHub App tokens for enhanced security: on-demand token minting, automatic revocation, fine-grained permissions, and better attribution.
Expand Down
22 changes: 22 additions & 0 deletions docs/src/content/docs/reference/sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,28 @@ jobs:
Use `go build` or `python3` - both are available.
```

#### Copilot BYOK request customization (`sandbox.agent.targets.copilot`)

When routing Copilot through a BYOK-compatible upstream behind the AWF proxy, you can attach custom headers, extra request body fields, and an explicit session identifier on upstream requests:

```yaml wrap
sandbox:
agent:
targets:
copilot:
extraHeaders:
x-openrouter-title: my-workflow
http-referer: https://github.com/${{ github.repository }}
extraBodyFields:
custom-field: custom-value
sessionId: ${{ github.run_id }}
```

Use this for OpenAI-compatible proxies and gateways that expect additional request metadata. `sessionId` is opt-in only; gh-aw does not derive it automatically.

> [!NOTE]
> Set `sessionId` only when your upstream expects a session identifier. Some strict OpenAI-compatible providers reject unknown `session_id` fields, so automatic injection would be unsafe.

#### Go cache paths in AWF (`GOMODCACHE` / `GOCACHE`)

When using `actions/setup-go` in AWF, pin Go cache paths explicitly so restore behavior is predictable:
Expand Down
Loading