Publish wiki from the repository

2026-10-10 04:44:49 +02:00
parent e7ae42cfb9
commit 427a5eb70f
+6 -8
@@ -12,8 +12,8 @@ leaves.
| Secret | Content | Used for | | Secret | Content | Used for |
| --- | --- | --- | | --- | --- | --- |
| `TOKEN_FOR_GITEA` | A bare token, a JSON string, or JSON with `GITEA_TOKEN` | Reading the repository (description, topics) and its push mirrors | | `TOKEN_FOR_GITEA` | The Gitea token, nothing else | Reading the repository (description, topics) and its push mirrors |
| `CREDENTIALS_FOR_GITHUB` | JSON object with a non-empty `GITHUB_PAT` | Changing the description and topics of the GitHub mirror | | `PAT_FOR_GITHUB` | The GitHub token, nothing else | Changing the description and topics of the GitHub mirror |
## Minimum permissions ## Minimum permissions
@@ -40,11 +40,9 @@ Calls made: `GET /repos/{owner}/{repo}` and `GET /repos/{owner}/{repo}/push_mirr
Calls made: `GET /repos/{owner}/{repo}`, `PATCH /repos/{owner}/{repo}` (description) Calls made: `GET /repos/{owner}/{repo}`, `PATCH /repos/{owner}/{repo}` (description)
and `PUT /repos/{owner}/{repo}/topics`. and `PUT /repos/{owner}/{repo}/topics`.
Format of `CREDENTIALS_FOR_GITHUB`: Format of `PAT_FOR_GITHUB`: only the token string (for example
`github_pat_...`), as clear text. The workflow only checks that it is not empty;
```json GitHub rejects a wrong value (HTTP 401).
{"GITHUB_PAT": "<token>"}
```
## What the workflow checks before it changes anything ## What the workflow checks before it changes anything
@@ -70,7 +68,7 @@ when that secret exists and otherwise reuses `TOKEN_FOR_GITEA`.
| Secret | Content | Used for | | Secret | Content | Used for |
| --- | --- | --- | | --- | --- | --- |
| `TOKEN_FOR_GITEA_WIKI` (optional) | A bare token, a JSON string, or JSON with `GITEA_TOKEN` | Writing the wiki pages of this repository | | `TOKEN_FOR_GITEA_WIKI` (optional) | The Gitea token, nothing else | Writing the wiki pages of this repository |
- The token that is used needs scope `write:repository`, and its user needs - The token that is used needs scope `write:repository`, and its user needs
write access to this repository. Gitea has no wiki-only scope. write access to this repository. Gitea has no wiki-only scope.