Skip to content

Commit 30f73ee

Browse files
markg-githubnpmccallum
authored andcommitted
docs: Describe authentication with GitHub
Describe permissions needed to authenticate with GitHub. Resolves: #5
1 parent 762e4e3 commit 30f73ee

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ dispatch --owner AMDEPYC --repo dispatch --tag example
2828
dispatch --owner AMDEPYC --repo dispatch --tag example workload-7
2929
```
3030

31+
See [Permissions](#permissions) section for more on authenticating with GitHub.
32+
3133
## How It Works
3234

3335
```mermaid
@@ -128,3 +130,34 @@ Each workload progresses through these states:
128130
4. **⚡ Booting** → Workload is booting (via `beacon boot`)
129131
5. **📝 Reported** → Results submitted (via `beacon report`)
130132
6. **🏁 Finished/Failed** → Final state
133+
134+
## Permissions
135+
136+
dispatch uses GitHub APIs to download Release Assets and to create Issues in the repo specified on the dispatch command line. Certain permissions are needed for this to work.
137+
138+
### Option 1
139+
140+
Before running dispatch, run 'gh auth login' and choose to authenticate via the web browser flow.
141+
142+
### Option 2
143+
144+
Before running dispatch, run 'gh auth login' and choose to authenticate by pasting an authentication token.
145+
146+
#### Fine-grained PAT
147+
148+
If using a fine-grained token (PAT), it must have, at a minimum, the following permissions:
149+
150+
- `Contents` Read-only access
151+
- `Issues` Read and write access
152+
153+
#### Classic PAT
154+
155+
If using a classic token (PAT), it must have, at a minimum, the `repo` permission.
156+
157+
### Option 3
158+
159+
When running dispatch, use the --token option and specify either a fine-grained or a classic PAT as described above.
160+
161+
### Option 4
162+
163+
Before running dispatch, set an environment variable named GITHUB_TOKEN to either a fine-grained or a classic PAT as described above.

0 commit comments

Comments
 (0)