Skip to content

Commit 9fd4d93

Browse files
Infinoidgabriel-samfira
authored andcommitted
doc: add forge-instance details to gitea.md
1 parent fb44fdd commit 9fd4d93

1 file changed

Lines changed: 68 additions & 5 deletions

File tree

doc/gitea.md

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ Starting with Gitea 1.24 and GARM v0.2.0, GARM supports Gitea as a forge alongsi
1414
- [5. Create a Gitea user and repo](#5-create-a-gitea-user-and-repo)
1515
- [6. Initialize GARM](#6-initialize-garm)
1616
- [Adding a Gitea endpoint](#adding-a-gitea-endpoint)
17-
- [Adding Gitea credentials](#adding-gitea-credentials)
18-
- [Adding a repository and pool](#adding-a-repository-and-pool)
17+
- [Setup for an individual repo](#setup-for-an-individual-repo)
18+
- [Adding Gitea repo credentials](#adding-gitea-repo-credentials)
19+
- [Adding a repository and pool](#adding-a-repository-and-pool)
20+
- [Setup for a full server](#setup-for-a-full-server)
21+
- [Adding Gitea instance credentials](#adding-gitea-instance-credentials)
22+
- [Adding a forge instance and pool](#adding-a-forge-instance-and-pool)
1923
- [Webhook configuration](#webhook-configuration)
2024
- [Differences from GitHub](#differences-from-github)
2125

@@ -122,7 +126,11 @@ garm-cli gitea endpoint create \
122126
--name local-gitea
123127
```
124128

125-
## Adding Gitea credentials
129+
## Setup for an individual repo
130+
131+
This configures a garm pool for a single git repo.
132+
133+
### Adding Gitea repo credentials
126134

127135
Create a Gitea PAT with `write:repository` and `write:organization` scopes:
128136

@@ -142,7 +150,7 @@ garm-cli gitea credentials add \
142150
--description "Gitea runner management token"
143151
```
144152

145-
## Adding a repository and pool
153+
### Adding a repository and pool
146154

147155
```bash
148156
garm-cli repo add \
@@ -172,6 +180,61 @@ garm-cli runner list
172180
garm-cli runner show <RUNNER_NAME>
173181
```
174182

183+
184+
## Setup for a full server
185+
186+
This configures a garm pool for an entire gitea instance.
187+
188+
### Adding Gitea instance credentials
189+
190+
Create a Gitea PAT with `write:admin` scopes:
191+
192+
```bash
193+
LOGIN=$(curl -s -X POST http://localhost/api/v1/users/testing/tokens \
194+
-u 'testing:superSecretPassword' \
195+
-H "Content-Type: application/json" \
196+
-d '{"name": "garm-token", "scopes": ["write:admin"]}')
197+
198+
TOKEN=$(echo $LOGIN | jq -r '.sha1')
199+
200+
garm-cli gitea credentials add \
201+
--endpoint local-gitea \
202+
--auth-type pat \
203+
--pat-oauth-token $TOKEN \
204+
--name gitea-token \
205+
--description "Gitea runner management token"
206+
```
207+
208+
### Adding a forge instance and pool
209+
210+
```bash
211+
garm-cli forge-instance add \
212+
--forge-type gitea \
213+
--credentials gitea-token \
214+
--endpoint local-gitea \
215+
--random-webhook-secret \
216+
--install-webhook
217+
218+
garm-cli pool add \
219+
--forge-instance gitea \
220+
--provider-name lxd_local \
221+
--image ubuntu:24.04 \
222+
--tags ubuntu-latest \
223+
--flavor default \
224+
--os-arch amd64 \
225+
--os-type linux \
226+
--enabled=true \
227+
--min-idle-runners=1 \
228+
--max-runners=5
229+
```
230+
231+
Check the runner:
232+
233+
```bash
234+
garm-cli runner list
235+
garm-cli runner show <RUNNER_NAME>
236+
```
237+
175238
## Webhook configuration
176239

177240
If GARM is on a private or internal IP address, Gitea will block webhook deliveries by default. You need to add GARM's address to Gitea's allowed host list in `app.ini`:
@@ -188,6 +251,6 @@ After changing `app.ini`, restart Gitea for the setting to take effect.
188251
## Differences from GitHub
189252

190253
- **Runner binary:** Gitea uses `gitea-runner` (formerly `act_runner`) instead of the GitHub Actions runner. GARM handles the differences transparently.
191-
- **Enterprise level:** Not available for Gitea
254+
- **Enterprise level:** Gitea instances are configured using `forge-instance` objects, rather than `enterprise` objects.
192255
- **Scale sets:** Not available for Gitea (GitHub-only feature)
193256
- **GitHub Apps:** Gitea uses PATs only

0 commit comments

Comments
 (0)