12 Commits
Author SHA1 Message Date
silverwind 757fb1927a Document code search and its query syntax (#615)
Documents https://github.com/go-gitea/gitea/pull/39403: a new user page for code search with the query syntax, results and API endpoints, and an update to the repository indexer page saying that `git grep` search needs Git with PCRE.

_Written by Claude._

Reviewed-on: https://gitea.com/gitea/docs/pulls/615
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-13 18:45:17 +00:00
silverwind d5a68736bd Remove the DSA minimum key size option (#646)
Documents https://github.com/go-gitea/gitea/pull/40332 for main, which removes SSH DSA key support. Drops the `DSA` option of `[ssh.minimum_key_sizes]` from the current docs in all three languages. Draft until the Gitea PR merges.

_Written by Claude (Opus 5.5)._

Reviewed-on: https://gitea.com/gitea/docs/pulls/646
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-12 18:22:57 +00:00
silverwindandLunny Xiao cb63f3ef8a Remove the builtin:checkout docs (#643)
Follow-up to https://gitea.com/gitea/runner/pulls/1407, which removes the runner's builtin actions. Drops `builtin:checkout` from the develop runner docs and the current comparison page, and lists the removal under the 6.0 breaking changes. Versioned docs keep it, as released runners still ship it, with their `builtin-actions.md` links pinned to the latest 4.x and 5.x tags since the file leaves runner main.

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/643
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-12 06:23:01 +00:00
silverwind fa8c890d01 Document running the macOS runner in the login session (#644)
Rewrites the `launchd (macOS)` section of the runner's binary installation page, in the develop and version 5 docs.

The old steps started the runner at boot as a service user, with directories that do not exist on macOS and a `PATH` that missed Homebrew on Apple silicon. Jobs started that way have no login keychain and no GUI.

The section now describes one setup: the runner runs in the login session of an existing user, with automatic login. It also covers the two problems that setup runs into: macOS blocks the runner from hosts on the Mac's own subnet, and Git's keychain helper can stop a job at a dialog.

The runner repository gets the same content as an example in https://gitea.com/gitea/runner/pulls/1408.

Reviewed-on: https://gitea.com/gitea/docs/pulls/644
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-11 10:34:40 +00:00
Renovate BotandLunny Xiao e707e2838a chore(deps): update dependencies (#640)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | Type | Update | Pending |
|---|---|---|---|---|---|---|
| [@astrojs/starlight](https://starlight.astro.build) ([source](https://github.com/withastro/starlight/tree/HEAD/packages/starlight)) | [`0.42.7` → `0.42.8`](https://renovatebot.com/diffs/npm/@astrojs%2fstarlight/0.42.7/0.42.8) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@astrojs%2fstarlight/0.42.8?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@astrojs%2fstarlight/0.42.7/0.42.8?slim=true) | dependencies | patch | `0.42.10` (+1) |
| [@pagefind/default-ui](https://github.com/Pagefind/pagefind) | [`1.5.2` → `1.6.0`](https://renovatebot.com/diffs/npm/@pagefind%2fdefault-ui/1.5.2/1.6.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@pagefind%2fdefault-ui/1.6.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@pagefind%2fdefault-ui/1.5.2/1.6.0?slim=true) | dependencies | minor |  |
| [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`7.4.2` → `7.4.5`](https://renovatebot.com/diffs/npm/astro/7.4.2/7.4.5) | ![age](https://developer.mend.io/api/mc/badges/age/npm/astro/7.4.5?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/astro/7.4.2/7.4.5?slim=true) | dependencies | patch | `7.4.7` (+1) |
| [pnpm](https://pnpm.io) ([source](https://github.com/pnpm/pnpm/tree/HEAD/pnpm/npm/pnpm)) | [`12.16.1` → `12.17.0`](https://renovatebot.com/diffs/npm/pnpm/12.16.1/12.17.0) | ![age](https://developer.mend.io/api/mc/badges/age/npm/pnpm/12.17.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/pnpm/12.16.1/12.17.0?slim=true) | packageManager | minor | `12.18.0` |
| [pnpm/action-setup](https://github.com/pnpm/action-setup) ([changelog](https://github.com/pnpm/action-setup/compare/0977fd99725f1db4007ccb2928dbb4e90d06cc86..73e46992e05b19abd31f2f3c20e0e7370d762115)) | `0977fd9` → `73e4699` |  |  | action | digest |  |

---

### Release Notes

<details>
<summary>withastro/starlight (@&#8203;astrojs/starlight)</summary>

### [`v0.42.8`](https://github.com/withastro/starlight/blob/HEAD/packages/starlight/CHANGELOG.md#0428)

[Compare Source](https://github.com/withastro/starlight/compare/@astrojs/[email protected]...@astrojs/[email protected])

##### Patch Changes

- [#&#8203;4309](https://github.com/withastro/starlight/pull/4309) [`3490c80`](https://github.com/withastro/starlight/commit/3490c803a5fd02019fd3c9357982e9e3753e335d) Thanks [@&#8203;athulsreekumar](https://github.com/athulsreekumar)! - Fixes autogenerated sidebar groups omitting directories whose names match `Object.prototype` properties, such as `constructor` or `toString`

- [#&#8203;4290](https://github.com/withastro/starlight/pull/4290) [`bf93823`](https://github.com/withastro/starlight/commit/bf938239f5f9775318baeaea1adc1ef93768628c) Thanks [@&#8203;RaphaelFakhri](https://github.com/RaphaelFakhri)! - Fixes missing last-updated dates in production builds for pages whose file path contains special characters

- [#&#8203;4295](https://github.com/withastro/starlight/pull/4295) [`af9557e`](https://github.com/withastro/starlight/commit/af9557ea8c957173ea9174e19a87d80fce22a983) Thanks [@&#8203;delucis](https://github.com/delucis)! - Fixes a formatting issue in some error messages impacting projects with Zod ≥4.5 installed

- [#&#8203;4299](https://github.com/withastro/starlight/pull/4299) [`a103f38`](https://github.com/withastro/starlight/commit/a103f383bcd99a7bd0b9c62a678c41ec5202497b) Thanks [@&#8203;clean99](https://github.com/clean99)! - Fixes empty sidebars when autogenerating entries from the docs root directory using `directory: ''`

</details>

<details>
<summary>Pagefind/pagefind (@&#8203;pagefind/default-ui)</summary>

### [`v1.6.0`](https://github.com/Pagefind/pagefind/blob/HEAD/CHANGELOG.md#v160-November-1-2026)

[Compare Source](https://github.com/Pagefind/pagefind/compare/v1.5.2...v1.6.0)

👋 A little overdue, but this release knocks out a healthy selection of bug reports, and includes a lot of work from the community. Thanks to everyone who contributed ❤️ - [@&#8203;bglw](https://github.com/bglw)

##### Multilingual Segmentation

Pagefind's extended build now segments Chinese, Japanese, and Thai pages with ICU4X, replacing the previous dependency (PR [#&#8203;1383](https://github.com/Pagefind/pagefind/issues/1383)). Alongside producing a smaller binary, ICU4X segments a lot closer to the `Intl.Segmenter` used in the browser on the search query (which is ICU4C). This closes out a mixture of latent and reported issues where the different segmentation between indexing and searching makes for iffy results. It's not perfect yet, but it's a darn sight closer.

Bonuses:

- Segmentation is smarter in languages such as Thai, and doesn't break inside a grapheme cluster
- Japanese katakana has special handling, but should still be improved over 1.5.2
- Japanese voiced and semi-voiced sound marks are no longer normalized into each other

##### Fewer Fragment Files

Pagefind now has an option to limit the total number of fragment files produced, for hosting providers that cap the number of uploaded files. Contributed in PR [#&#8203;1020](https://github.com/Pagefind/pagefind/issues/1020) — thanks [@&#8203;yakovsh](https://github.com/yakovsh) !

This limit is set with `--max-fragments` / `max_fragments`, and applies per language. When applied, multiple fragments are bundled together and loaded as a set when required.

See [📘 Max fragments](https://pagefind.app/docs/config-options/#max-fragments).

##### Explicit Sub-Result Titles

Added support for explicit sub-result titles. Any element with both an `id` and a `data-pagefind-title` attribute can be used as a sub-result (PR [#&#8203;1282](https://github.com/Pagefind/pagefind/issues/1282) — thanks [@&#8203;samuel-williams-shopify](https://github.com/samuel-williams-shopify) !)

See [📘 Defining a sub result explicitly](https://pagefind.app/docs/sub-results/#defining-a-sub-result-explicitly).

##### Component UI

- Added a `sort` attribute to `<pagefind-config>`, to order results by a [sort key](https://pagefind.app/docs/js-api-sorting/) (PR [#&#8203;1326](https://github.com/Pagefind/pagefind/issues/1326))
- Added a `max-sub-results` attribute to `<pagefind-searchbox>` (PR [#&#8203;1324](https://github.com/Pagefind/pagefind/issues/1324))
- Added a `placeholder` setter to `<pagefind-searchbox>` and `<pagefind-modal-trigger>` (PR [#&#8203;1321](https://github.com/Pagefind/pagefind/issues/1321))
- `configureInstance` now applies to an instance that already exists but has not loaded yet (PR [#&#8203;1323](https://github.com/Pagefind/pagefind/issues/1323))
- Fixed the UI language being resolved after the first render, which could flash the wrong translations (PR [#&#8203;1332](https://github.com/Pagefind/pagefind/issues/1332))
- Fixed component cleanup after being disconnected (PR [#&#8203;1322](https://github.com/Pagefind/pagefind/issues/1322))
- Fixed IME composition keystrokes support (PR [#&#8203;1284](https://github.com/Pagefind/pagefind/issues/1284) — thanks [@&#8203;oharu121](https://github.com/oharu121) !)
- Fixed the modal staying open when clicking a result for the current page (PR [#&#8203;1327](https://github.com/Pagefind/pagefind/issues/1327))
- Fixed the filter panel checkbox shrinking when its label wraps (PR [#&#8203;1166](https://github.com/Pagefind/pagefind/issues/1166) — thanks [@&#8203;mbrambilla](https://github.com/mbrambilla) !)
- Hid the keyboard shortcut badge on touch-only devices (PR [#&#8203;1325](https://github.com/Pagefind/pagefind/issues/1325))

##### Search Results & Options

- Added an `excerptEllipsis` option to mark the truncated ends of excerpts (PR [#&#8203;1320](https://github.com/Pagefind/pagefind/issues/1320))
  - See [📘 Excerpt ellipsis](https://pagefind.app/docs/search-config/#excerpt-ellipsis)
- Fixed phrase search across diacritic variants, so searching `"cafe latte"` can match a page containing `café latte` (PR [#&#8203;1386](https://github.com/Pagefind/pagefind/issues/1386) — thanks [@&#8203;sean0407](https://github.com/sean0407) !)
- Fixed filters not matching values containing escaped characters such as quotes or backslashes (PR [#&#8203;1392](https://github.com/Pagefind/pagefind/issues/1392))
- Fixed compound words being counted twice in metadata coverage, which could overvalue a metadata match (PR [#&#8203;1319](https://github.com/Pagefind/pagefind/issues/1319))
- Fixed a bug which could build excerpts from the wrong words (PR [#&#8203;1318](https://github.com/Pagefind/pagefind/issues/1318))
- Fixed decoding for HTML entities in the automatic `image` and `image_alt` metadata (PR [#&#8203;1393](https://github.com/Pagefind/pagefind/issues/1393) — thanks [@&#8203;digilist](https://github.com/digilist) !)

##### Indexing & Performance

- More work making the index deterministic between builds (PR [#&#8203;1124](https://github.com/Pagefind/pagefind/issues/1124) — thanks [@&#8203;gissimo](https://github.com/gissimo) !)
- Improved search performance on a bunch of broad queries (PR [#&#8203;1334](https://github.com/Pagefind/pagefind/issues/1334))
- Fixed a bug where a word with many variants could produce an oversized index chunk (PR [#&#8203;1316](https://github.com/Pagefind/pagefind/issues/1316))
- Searches no longer request index chunks for empty terms (PR [#&#8203;1317](https://github.com/Pagefind/pagefind/issues/1317))
- More minor search performance work (PR [#&#8203;1238](https://github.com/Pagefind/pagefind/issues/1238) — thanks [@&#8203;sanjaiyan-dev](https://github.com/sanjaiyan-dev) !)

##### Fixes & Tweaks

- Search terms that normalize to nothing are now dropped, rather than searching for an empty term (PR [#&#8203;1382](https://github.com/Pagefind/pagefind/issues/1382))
- Improved some compound indexing, so `sysconfig.is_python_build` can be found by searching `is_python_build`
- Fixed a way that output files could be truncated in service-mode (PR [#&#8203;1272](https://github.com/Pagefind/pagefind/issues/1272) — thanks [@&#8203;zelinskyy](https://github.com/zelinskyy) !)
- Fixed `--exclude-selectors` hard-erroring when a single selector could not be parsed (PR [#&#8203;1312](https://github.com/Pagefind/pagefind/issues/1312) — thanks [@&#8203;dualfroz](https://github.com/dualfroz) !)
- Improved handling of percent-encoded page URLs (PR [#&#8203;1315](https://github.com/Pagefind/pagefind/issues/1315), PR [#&#8203;1335](https://github.com/Pagefind/pagefind/issues/1335) — thanks [@&#8203;dualfroz](https://github.com/dualfroz) !)
- Failed index fetches are now evicted from the cache correctly and are retried (PR [#&#8203;1329](https://github.com/Pagefind/pagefind/issues/1329))
- Per-page warnings are now only logged with `--verbose` (PR [#&#8203;1314](https://github.com/Pagefind/pagefind/issues/1314))

##### UI Translations

- Added Macedonian (mk) translations (PR [#&#8203;1353](https://github.com/Pagefind/pagefind/issues/1353) — thanks [@&#8203;I90rche](https://github.com/I90rche) !)
- Added Bulgarian (bg) translations (PR [#&#8203;1341](https://github.com/Pagefind/pagefind/issues/1341) — thanks [@&#8203;salif](https://github.com/salif) !)
- Improved French (fr) translations (PR [#&#8203;1145](https://github.com/Pagefind/pagefind/issues/1145) — thanks [@&#8203;maxonss](https://github.com/maxonss) !)
- Improved German (de) translations (PR [#&#8203;1096](https://github.com/Pagefind/pagefind/issues/1096) — thanks [@&#8203;randomguy-2650](https://github.com/randomguy-2650) !)
- Improved Persian (fa) translations (PR [#&#8203;1204](https://github.com/Pagefind/pagefind/issues/1204) — thanks [@&#8203;Goudarz](https://github.com/Goudarz) !)
- Improved Swahili (sw) translations (PR [#&#8203;1185](https://github.com/Pagefind/pagefind/issues/1185) — thanks [@&#8203;gully223](https://github.com/gully223) !)

</details>

<details>
<summary>withastro/astro (astro)</summary>

### [`v7.4.5`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#745)

[Compare Source](https://github.com/withastro/astro/compare/[email protected]@7.4.5)

##### Patch Changes

- [#&#8203;18558](https://github.com/withastro/astro/pull/18558) [`fac3c50`](https://github.com/withastro/astro/commit/fac3c50463ce9c290bdccb1d6dba30dc7ca4d779) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes `astro dev status` and other background server commands deleting the lock file of a running dev or preview server when run from a sandbox or as another user that is not permitted to signal its process

- [#&#8203;18559](https://github.com/withastro/astro/pull/18559) [`10dae2f`](https://github.com/withastro/astro/commit/10dae2f31486cc0a6a04d1f3d7f5ab7fa8889b30) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes `import.meta.env` values containing `$` sequences (such as `$$` or `$&`) being corrupted in `astro build` when server code reads the `import.meta.env` object directly, for example with `const { MY_SECRET } = import.meta.env`

- [#&#8203;18544](https://github.com/withastro/astro/pull/18544) [`e3bec3d`](https://github.com/withastro/astro/commit/e3bec3d2c770cb53771dad723db57a2ebf931b42) Thanks [@&#8203;skezo](https://github.com/skezo)! - Fixes request paths with invalid percent-encoding (e.g. `/%C0%AF` or a bare `%`) being logged as an `Invalid URL encoding` error and routed with the undecoded path. These requests now return a `400`, the same as a path that is encoded too many times.

- [#&#8203;18520](https://github.com/withastro/astro/pull/18520) [`e023aba`](https://github.com/withastro/astro/commit/e023abac912d7cb6af2b9fb5107ef5dabc667096) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Makes rendering of string tag names stricter and consistent across `.astro` dynamic tags, JSX, and MDX. Only the leading part of the string that is a valid element name is rendered, so characters such as `/` or `=` can no longer change the generated markup. A string that does not start with a valid element name (for example `'!--'` or `''`) now throws an error instead of producing invalid HTML.

### [`v7.4.4`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#744)

[Compare Source](https://github.com/withastro/astro/compare/[email protected]@7.4.4)

##### Patch Changes

- [#&#8203;18344](https://github.com/withastro/astro/pull/18344) [`df838da`](https://github.com/withastro/astro/commit/df838da6c6d965504fae0d89e12d3e67bdd0f4c6) Thanks [@&#8203;edmundhung](https://github.com/edmundhung)! - Allows `astro add` to configure tagged versions of official adapters

### [`v7.4.3`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#743)

[Compare Source](https://github.com/withastro/astro/compare/[email protected]@7.4.3)

##### Patch Changes

- [#&#8203;18488](https://github.com/withastro/astro/pull/18488) [`e4e25fa`](https://github.com/withastro/astro/commit/e4e25fa7d47e702985cbb1ee633d4ffb92f8dad6) Thanks [@&#8203;umeraamir69](https://github.com/umeraamir69)! - CSP no longer hashes empty children on external stylesheets and scripts, which was inserting the SHA-256 of the empty string into `script-src` and `style-src`.

- [#&#8203;18500](https://github.com/withastro/astro/pull/18500) [`e5a3a1b`](https://github.com/withastro/astro/commit/e5a3a1bdec268933f01a0da3fbeb4e38bdf455c9) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes `<Image>` and `<Picture>` emitting duplicate `srcset` candidates when `densities` contains equivalent values such as `1` and `'1x'`

- [#&#8203;18517](https://github.com/withastro/astro/pull/18517) [`c3185b7`](https://github.com/withastro/astro/commit/c3185b764e14f50664b0e63ec665804fdecf685e) Thanks [@&#8203;okxint](https://github.com/okxint)! - Fix unhandled `AbortError` rejection when `ClientRouter` skips a pending view transition

- [#&#8203;18497](https://github.com/withastro/astro/pull/18497) [`c712113`](https://github.com/withastro/astro/commit/c7121132acc25ee3a7f3dc6dd36240f031537878) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes an uncaught `TypeError` in the browser when a `server:defer` island request fails due to a network error. The fallback content is kept, as it is for non-200 responses.

- [#&#8203;18525](https://github.com/withastro/astro/pull/18525) [`d0240b9`](https://github.com/withastro/astro/commit/d0240b9d5738a97f0b8ad100b76bce8b7527e4cd) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes a `DEP0190` deprecation warning printed by `astro info` on Node.js 24 and later

- [#&#8203;18522](https://github.com/withastro/astro/pull/18522) [`776b9a6`](https://github.com/withastro/astro/commit/776b9a6124a8d5aef8e280a8af4f8ba68c80e65b) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes `memoryCache()` serving an empty body for cached pages that return an empty `404` or `500` response. These responses now render the `404` or `500` error page on every request.

- [#&#8203;18511](https://github.com/withastro/astro/pull/18511) [`d060ff9`](https://github.com/withastro/astro/commit/d060ff9b68f737af2788e521635afb6f6a84b029) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes `transition:name` styles missing in dev when the element is inside a component that is only rendered through another component with no styles or scripts

- [#&#8203;18494](https://github.com/withastro/astro/pull/18494) [`5fe699c`](https://github.com/withastro/astro/commit/5fe699c888d0423db75cac3f0939409d7eb28e37) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes the `astro` CLI refusing to run on StackBlitz by allowing Node.js `>=22.22.0` inside WebContainers, whose Node.js version users cannot change

- [#&#8203;18506](https://github.com/withastro/astro/pull/18506) [`bf43a60`](https://github.com/withastro/astro/commit/bf43a6042f8a9e87c2cef1b4c36700d4e941c35f) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes `<ClientRouter />` animating scroll restoration on back/forward navigation when `scroll-behavior: smooth` is set. Saved scroll positions are now restored instantly, matching the browser's native behavior.

- [#&#8203;18476](https://github.com/withastro/astro/pull/18476) [`8ea79a2`](https://github.com/withastro/astro/commit/8ea79a282e53b83c65f69c9013f5eeb5d97aadb1) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes a `DataCloneError` crash when building pages that render SVG imports with `<Image />` or `getImage()` while `experimental.parallelPrerender` is enabled.

- [#&#8203;18504](https://github.com/withastro/astro/pull/18504) [`6dbd737`](https://github.com/withastro/astro/commit/6dbd73764f8a0f16d696f276b634e32631982aab) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes `<Picture>` emitting a duplicate `1x` candidate in `<source>` `srcset` when `densities` includes `1`

- [#&#8203;18524](https://github.com/withastro/astro/pull/18524) [`7524889`](https://github.com/withastro/astro/commit/75248890363ce7de03e5d9b56605958323752dc4) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes type errors reported in Astro's built-in `<Image />`, `<Picture />`, `<Code />`, `<Debug />` and `<ClientRouter />` components when type-checking a project that extends `astro/tsconfigs/strictest` with `tsc` and `@astrojs/ts-content-mapper`

- [#&#8203;18493](https://github.com/withastro/astro/pull/18493) [`3773941`](https://github.com/withastro/astro/commit/377394179293d1f898c49d38a5b28cf9b21641a9) Thanks [@&#8203;astro-factory](https://github.com/apps/astro-factory)! - Fixes scoped styles of unused Astro components being included in the build when those components are re-exported from a barrel file

- [#&#8203;18512](https://github.com/withastro/astro/pull/18512) [`1151b9e`](https://github.com/withastro/astro/commit/1151b9e0d05e850fa3638a927ac9f66179010e00) Thanks [@&#8203;jp-knj](https://github.com/jp-knj)! - Fixes CSP hashes added with `Astro.csp` from components rendered inside `<body>` being left out of the CSP `<meta>` element in static builds, including MDX pages

- Updated dependencies \[[`6cf3423`](https://github.com/withastro/astro/commit/6cf3423e4c62af5e54a2676c8304a209ab1e064d), [`edfbf4a`](https://github.com/withastro/astro/commit/edfbf4ab34ff007ae8f7188af76a023a15c9443d)]:
  - [@&#8203;astrojs/telemetry](https://github.com/astrojs/telemetry)@3.4.2
  - [@&#8203;astrojs/markdown-satteri](https://github.com/astrojs/markdown-satteri)@0.4.6

</details>

<details>
<summary>pnpm/pnpm (pnpm)</summary>

### [`v12.17.0`](https://github.com/pnpm/pnpm/releases/tag/v12.17.0): pnpm 12.17

[Compare Source](https://github.com/pnpm/pnpm/compare/v12.16.1...v12.17.0)

pnpm 12.17.0 adds `pnpm peers check --global`, dependency-group selectors and wildcards in `overrides`, and runtime, package manager, Cargo, and Python updates in `pnpm outdated` and `pnpm update`. It also fixes files that other users could not read in Docker images, and repeat installs that missed changes to local dependencies.

##### Minor Changes

- `pnpm peers check` now accepts `--global` (`-g`) to check globally installed packages. After a global install or update, the peer dependency warning now suggests `pnpm peers check -g` [#&#8203;17504](https://github.com/pnpm/pnpm/issues/17504).

- `pnpm outdated` and `pnpm update` now inspect and update package manager and runtime versions in `devEngines.packageManager`, `packageManager`, `devEngines.runtime`, `engines.runtime`, and `runtime:` dependencies. With `cargo.enabled` or `python.enabled`, `pnpm outdated` and `pnpm update` also inspect and update Cargo dependencies in `Cargo.toml` and `Cargo.lock` and Python dependencies in `pyproject.toml` and `pylock.toml`.

- `overrides` selectors now support `:prod`, `:optional`, and `:peer` pseudo-selectors that target a single dependency group. They also support `*` wildcard patterns on parent and target package names. An override with a non-range value, such as `npm:` or `file:`, no longer adds a peer dependency to `dependencies`. Removing an optional dependency with `"-"` now also removes the duplicate entry from `dependencies` [#&#8203;5391](https://github.com/pnpm/pnpm/issues/5391).

##### Patch Changes

##### Installing packages

- Files that pnpm creates in a project now get the permissions the umask gives any new file, such as `0644`. Before, several of them were readable only by the user who ran pnpm, which broke Docker images that run as a different user [#&#8203;17435](https://github.com/orgs/pnpm/discussions/17435).

  The fix applies to:

  - `node_modules/.pnpm-workspace-state-v1.json`. A different user running `pnpm run` reinstalled the dependencies because it could not read this file.
  - `pnpm-workspace.yaml`
  - the files written by `pnpm deploy`
  - patch files from `pnpm patch-commit`
  - the lockfile restored by `pnpm dedupe --check`
  - the Cargo and Python files that pnpm writes

  When pnpm edits an existing file, the file keeps its permissions.

- `pnpm install` no longer writes broken dependency links when the project's `node_modules` is a symlink to another directory, such as another project's `node_modules`. The install reported success, but the links it wrote did not resolve [#&#8203;17448](https://github.com/pnpm/pnpm/issues/17448).

- Commands installed with `pnpm add --global` now find the dependencies that pnpm hoists for their package. A package that loads a dependency it does not declare, such as a native addon's platform-specific package, failed with "Cannot find module". Reinstall such a package with `pnpm add --global` to update its existing command [#&#8203;17503](https://github.com/pnpm/pnpm/issues/17503).

- When pnpm switches to the version a project pins, it now installs that version's native binary for the current host, even if the project's `supportedArchitectures` excludes the host. Before, pnpm could not use the pinned version and kept running the installed one. pnpm also repairs a pinned version that an earlier install left without the host's binary.

- With the global virtual store, a change to a dependency of one package in a dependency cycle now gives every package in that cycle a new directory. Before, the other packages kept their directories and still linked the old copy of the changed package, so the project could load two copies of it [#&#8203;17466](https://github.com/pnpm/pnpm/issues/17466).

  Packages in a dependency cycle, and packages that depend on one, move to new global virtual store directories once after this update. Those that run a build miss the side-effects cache once.

- With `nodeLinker: hoisted`, when two workspace projects need the same package version and it cannot be hoisted to the root, each project now keeps the copy installed in its own `node_modules`. Build scripts run in each of these copies. Before, the second project's copy was replaced with a symlink to the first project's, so every repeat install imported it again [#&#8203;17498](https://github.com/pnpm/pnpm/issues/17498).

- The Node.js `latest` selector now chooses the newest stable release [#&#8203;17490](https://github.com/pnpm/pnpm/issues/17490).

- Hardlinking from the store now stats each store file once per install. Since pnpm 12.8.0, a store file was stat'ed again for every package that links it. On an offline install of a large workspace, that added up to 15% system CPU [#&#8203;17500](https://github.com/pnpm/pnpm/issues/17500).

##### Repeat installs and local dependencies

- `pnpm install --frozen-lockfile` no longer reports an outdated lockfile right after the install that wrote it. This happened when a pnpmfile `readPackage` hook or `packageExtensions` changed the dependencies or peer dependencies of a local directory dependency outside the workspace projects. It affected a `file:` dependency, an injected `workspace:../dir` dependency outside the workspace patterns, and an injected workspace package left out by `--filter` [#&#8203;17447](https://github.com/pnpm/pnpm/issues/17447) [#&#8203;17473](https://github.com/pnpm/pnpm/issues/17473).

  A repeat `pnpm install` now takes the fast path when `ignoredOptionalDependencies` removes an optional dependency of a `file:` directory dependency. It used to resolve again on every run.

- `pnpm install` now resolves again after an edit to an injected `workspace:../dir` dependency outside the workspace patterns under a shared lockfile. It used to keep the lockfile unchanged. The next `pnpm install --frozen-lockfile` then failed [#&#8203;17476](https://github.com/pnpm/pnpm/issues/17476).

- `pnpm install` now resolves a local directory again after its `package.json` changes when an override or a package extension adds it to the dependencies of a registry package. `pnpm install --frozen-lockfile` fails on a lockfile that still records the old dependencies of such a directory [#&#8203;17486](https://github.com/pnpm/pnpm/issues/17486).

- With `injectWorkspacePackages` and per-project lockfiles, `pnpm install` now updates a project's lockfile when a local tarball that an injected workspace project depends on is replaced. The project's lockfile kept the old version and integrity before.

- `pnpm install` now detects a change to a local tarball or directory that only a pnpmfile `readPackage` hook depends on. A repeat install reported "Already up to date" and kept the old contents before [pnpm/tasks#227](https://github.com/pnpm/tasks/issues/227).

- `pnpm install` now relinks a `workspace:` or `link:` dependency whose link was deleted from `node_modules`. It used to report "Already up to date" and leave the link missing [#&#8203;17485](https://github.com/pnpm/pnpm/issues/17485).

- A repeat `pnpm install` reports "Already up to date" again when a pnpmfile `readPackage` hook changes the dependencies of a workspace project. Since 12.15.0, every such install ran in full [#&#8203;17468](https://github.com/pnpm/pnpm/issues/17468).

  After an edit to a project's `package.json`, `pnpm install` and `verifyDepsBeforeRun` now run the pnpmfile's `readPackage` hook on the edited manifest before comparing it with the lockfile. They could report the project up to date when the hook rewrote the edited dependency to a specifier the lockfile did not record.

##### Adding and updating dependencies

- `pnpm update --latest` with package selectors now updates the dependencies of the selected packages within their declared ranges. Excluded packages and their dependencies keep their locked versions [#&#8203;17444](https://github.com/pnpm/pnpm/issues/17444).

- `pnpm add <pkg>@<tag>` now uses a catalog entry set to that same dist-tag. The dependency is saved as `catalog:` and the entry stays as written [pnpm/tasks#225](https://github.com/pnpm/tasks/issues/225).

  When `pnpm add` adds a new dist-tag such as `vue@legacy` to a catalog, the catalog entry records the exact version the tag points to. The same applies to a dependency added without a version when the `tag` setting names a dist-tag other than `latest`.

- `pnpm add` now saves the resolved version range of an npm alias. For example, `pnpm add v2@npm:vue` and `pnpm add v2@npm:vue@^3.0.0` both save `npm:vue@^3.5.13`.

##### Running scripts and commands

- Programs that a script or `pnpm exec` command leaves running, such as a browser opened by the `open` package, now outlive pnpm exactly when they would outlive the command run without pnpm. Before, on Windows, a failed command, `Ctrl+C`, or a closed terminal ended all of them. pnpm still ends them when it is killed or crashes.

  When a recursive or parallel run bails, the scripts still running now receive `SIGTERM` on Unix and are killed only if they are still running two seconds later. On Windows, everything those scripts started is ended, including detached processes whose parent has already exited. Before, a bail killed them at once [#&#8203;17465](https://github.com/pnpm/pnpm/issues/17465).

- On Windows, the shell shim of a `.cmd` or `.bat` bin now runs it under Git Bash when MSYS argument conversion is off, such as with `MSYS_NO_PATHCONV=1` or `MSYS2_ARG_CONV_EXCL='*'`. The shim used to start an interactive cmd.exe prompt [#&#8203;17480](https://github.com/pnpm/pnpm/issues/17480).

- `pnx` and `pnpm create` now run the command in the directory selected by `--dir` or `--workspace-root`. Without either flag, the command still runs in the directory pnpm was started in.

- `pnpm --env-file` now reads files the way `node --env-file` does. Values are taken as written, so `$VAR` is no longer expanded and Windows paths such as `C:\Users\me` load unchanged. A file is no longer rejected for its contents.

##### Settings and messages

- `pnpm version` no longer creates a git commit and tag when `gitTagVersion` is set to `false` [#&#8203;17460](https://github.com/pnpm/pnpm/issues/17460).

- `pnpm publish` now reads the `publishBranch` setting from `pnpm-workspace.yaml` and from `PNPM_CONFIG_PUBLISH_BRANCH`. The `--publish-branch` flag overrides it.

- `pnpm` now accepts `--strict-ssl` and `--local-address <ip>` on the command line.

- `pnpm doctor` uses a 15-second timeout when checking registry connectivity.

- `pnpm-workspace.yaml` parse errors now report `ERR_PNPM_INVALID_SETTING`.

- The error for a dependency with an invalid name in a project's manifest now names the project's directory. It used to say only "The current package", which did not tell which workspace project to fix [#&#8203;17475](https://github.com/pnpm/pnpm/issues/17475).

<!-- sponsors -->

#### Platinum Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
        <a href="https://bit.cloud/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/bit.svg" width="80" alt="Bit"></a>
      </td>
      <td align="center" valign="middle">
        <a href="https://openai.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/openai_dark.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/openai_light.svg" />
            <img src="https://pnpm.io/img/users/openai_dark.svg" width="160" alt="OpenAI" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://notion.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/notion.svg" width="80" alt="Notion"></a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://coderabbit.ai/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/coderabbit.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/coderabbit_light.svg" />
            <img src="https://pnpm.io/img/users/coderabbit.svg" width="220" alt="CodeRabbit" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://www.cloudflare.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/cloudflare.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/cloudflare_light.svg" />
            <img src="https://pnpm.io/img/users/cloudflare.svg" width="160" alt="Cloudflare" />
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>

#### Gold Sponsors

<table>
  <tbody>
    <tr>
      <td align="center" valign="middle">
        <a href="https://sanity.io/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/sanity.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/sanity_light.svg" />
            <img src="https://pnpm.io/img/users/sanity.svg" width="120" alt="Sanity" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://discord.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/discord.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/discord_light.svg" />
            <img src="https://pnpm.io/img/users/discord.svg" width="220" alt="Discord" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://vite.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/vitejs.svg" width="42" alt="Vite"></a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://serpapi.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/serpapi_dark.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/serpapi_light.svg" />
            <img src="https://pnpm.io/img/users/serpapi_dark.svg" width="160" alt="SerpApi" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://stackblitz.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/stackblitz.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/stackblitz_light.svg" />
            <img src="https://pnpm.io/img/users/stackblitz.svg" width="190" alt="Stackblitz" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://workleap.com/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/workleap.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/workleap_light.svg" />
            <img src="https://pnpm.io/img/users/workleap.svg" width="190" alt="Workleap" />
          </picture>
        </a>
      </td>
    </tr>
    <tr>
      <td align="center" valign="middle">
        <a href="https://nx.dev/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/nx.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/nx_light.svg" />
            <img src="https://pnpm.io/img/users/nx.svg" width="50" alt="Nx" />
          </picture>
        </a>
      </td>
      <td align="center" valign="middle">
        <a href="https://latitude.so/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer"><img src="https://pnpm.io/img/users/latitude.svg" width="160" alt="Latitude"></a>
      </td>
      <td align="center" valign="middle">
        <a href="https://syntax.fm/?utm_source=pnpm&utm_medium=release_notes" target="_blank" rel="noopener noreferrer">
          <picture>
            <source media="(prefers-color-scheme: light)" srcset="https://pnpm.io/img/users/syntaxfm.svg" />
            <source media="(prefers-color-scheme: dark)" srcset="https://pnpm.io/img/users/syntaxfm_light.svg" />
            <img src="https://pnpm.io/img/users/syntaxfm.svg" width="90" alt="Syntax" />
          </picture>
        </a>
      </td>
    </tr>
  </tbody>
</table>

<!-- sponsors end -->

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xOTkuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjIyMi41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

<!-- cloudflare-preview --> Preview: https://pr-640.docs-gitea-com.pages.dev

---------

Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/640
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
2026-11-09 04:54:24 +00:00
Gitea Bot 4d38601dc2 Update the runner reference pages (#642)
Automated update of the generated runner reference pages from gitea/runner (main for the develop docs, the newest stable tag for every documented series), opened by the "update runner reference" scheduled workflow.

<!-- cloudflare-preview --> Preview: https://pr-642.docs-gitea-com.pages.dev

Reviewed-on: https://gitea.com/gitea/docs/pulls/642
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Gitea Bot <[email protected]>
2026-11-09 04:31:01 +00:00
Gitea Bot 6779b1d6d8 Update the latest api documents (#641)
Automated update of static/swagger-latest.json and static/openapi3-latest.json from the gitea main branch, opened by the "update api spec files" scheduled workflow.

<!-- cloudflare-preview --> Preview: https://pr-641.docs-gitea-com.pages.dev

Reviewed-on: https://gitea.com/gitea/docs/pulls/641
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: Gitea Bot <[email protected]>
2026-11-09 03:12:46 +00:00
878c885050 docs(packages): document terraform module registry (#433)
Ref: https://github.com/go-gitea/gitea/pull/38040

Adds docs/usage/packages/terraform-module.md describing the v1 scope,
naming rules, authentication, service discovery, HTTP API surface and
[packages] settings for the new private Terraform Module Registry.

---------

Co-authored-by: silverwind <[email protected]>
Co-authored-by: silverwind <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/433
Reviewed-by: silverwind <[email protected]>
Co-authored-by: Michael Lopez <[email protected]>
2026-11-07 11:43:22 +00:00
silverwind 6135d1dabf Trim the Actions comparison to actual differences (#638)
`$/` is [GitHub's self-repository prefix](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-using-an-action-in-the-same-repository-as-the-workflow-at-the-running-commit-recommended) with the same semantics, so it is no Gitea addition. The `builtin:checkout` input list was outdated since https://gitea.com/gitea/runner/pulls/1277 made it match `actions/checkout`.

Reviewed-on: https://gitea.com/gitea/docs/pulls/638
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-07 09:42:48 +00:00
wxiaoguangandLunny Xiao 0ddb9a2071 codeowners (#634)
https://github.com/go-gitea/gitea/pull/40243
Co-authored-by: Lunny Xiao <[email protected]>
Reviewed-on: https://gitea.com/gitea/docs/pulls/634
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: wxiaoguang <[email protected]>
2026-11-06 20:00:46 +00:00
silverwind 71869c6e24 Document MSSQL database preparation (#636)
The database preparation page covered only MySQL and PostgreSQL. MSSQL setups without schema permissions break on upgrades, like in https://github.com/go-gitea/gitea/issues/40256.

The new section shows the login, database and user setup with the roles Gitea needs, for main and 28, including zh-cn and zh-tw.

_Written by Claude (Opus 5.5)._

Reviewed-on: https://gitea.com/gitea/docs/pulls/636
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
2026-11-06 17:12:50 +00:00
silverwind 46b5401a81 Document the new DEFAULT_DELETE_BRANCH_AFTER_MERGE default (#608)
Documents https://github.com/go-gitea/gitea/pull/39975 for main, which changes the default of `DEFAULT_DELETE_BRANCH_AFTER_MERGE` to `true`.

Reviewed-on: https://gitea.com/gitea/docs/pulls/608
Reviewed-by: Lunny Xiao <[email protected]>
2026-11-05 23:34:03 +00:00
36 changed files with 1086 additions and 607 deletions

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
PUBLIC_DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }} PUBLIC_DOCSEARCH_INDEX_NAME: ${{ secrets.DOCSEARCH_INDEX_NAME }}
steps: steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6 - uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with: with:
node-version: 26 node-version: 26
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
NODE_OPTIONS: --max-old-space-size=8192 NODE_OPTIONS: --max-old-space-size=8192
steps: steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6 - uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
with: with:
node-version: 26 node-version: 26
+3 -3
View File
@@ -179,7 +179,7 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request. - `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request.
- `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author. - `ADD_CO_COMMITTER_TRAILERS`: **true**: Add co-authored-by and co-committed-by trailers to merge commit messages if committer does not match author.
- `RETARGET_CHILDREN_ON_MERGE`: **true**: Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo. - `RETARGET_CHILDREN_ON_MERGE`: **true**: Retarget child pull requests to the parent pull request branch target on merge of parent pull request. It only works on merged PRs where the head and base branch target the same repo.
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: Set the default value for "Delete pull request branch after merge by default" for new repositories. - `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **true**: Set the default value for "Delete pull request branch after merge by default" for new repositories.
- `DEFAULT_TITLE_SOURCE`: **auto**: Default source for the pull request title when opening a new PR. Valid options: - `DEFAULT_TITLE_SOURCE`: **auto**: Default source for the pull request title when opening a new PR. Valid options:
- `first-commit`: Uses the oldest commit's summary as the title. If there are multiple commits, still uses the first commit's message. - `first-commit`: Uses the oldest commit's summary as the title. If there are multiple commits, still uses the first commit's message.
- `auto`: Uses the commit's summary when the PR contains a single commit; when there are multiple commits, converts the branch name into a human-readable title by normalizing separators and casing. - `auto`: Uses the commit's summary when the PR contains a single commit; when there are multiple commits, converts the branch name into a human-readable title by normalizing separators and casing.
@@ -811,7 +811,6 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type
- `ED25519`: **256** - `ED25519`: **256**
- `ECDSA`: **256** - `ECDSA`: **256**
- `RSA`: **3071**: We set 3071 here because an otherwise valid 3072 RSA key can be reported as 3071 length. - `RSA`: **3071**: We set 3071 here because an otherwise valid 3072 RSA key can be reported as 3071 length.
- `DSA`: **-1**: DSA is now disabled by default. Set to **1024** to re-enable but ensure you may need to reconfigure your SSHD provider
## Webhook (`webhook`) ## Webhook (`webhook`)
@@ -1488,8 +1487,9 @@ These lists are enforced on direct connections only. When a proxy is configured
- `LIMIT_SIZE_RPM`: **-1**: Maximum size of a RPM upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) - `LIMIT_SIZE_RPM`: **-1**: Maximum size of a RPM upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_RUBYGEMS`: **-1**: Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) - `LIMIT_SIZE_RUBYGEMS`: **-1**: Maximum size of a RubyGems upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_SWIFT`: **-1**: Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) - `LIMIT_SIZE_SWIFT`: **-1**: Maximum size of a Swift upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_TERRAFORM_MODULE`: **-1**: Maximum size of a Terraform module archive upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`). Archives are additionally capped at 32 MiB decompressed.
- `LIMIT_SIZE_TERRAFORM_STATE`: **-1**: Maximum size of a Terraform state upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_VAGRANT`: **-1**: Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`) - `LIMIT_SIZE_VAGRANT`: **-1**: Maximum size of a Vagrant upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
- `LIMIT_SIZE_TERRAFORM_STATE``: **-1**: Maximum size of a Terraform state upload (`-1` means no limits, format `1000`, `1 MB`, `1 GiB`)
## Mirror (`mirror`) ## Mirror (`mirror`)
+4 -3
View File
@@ -10,9 +10,10 @@ aliases:
## Builtin repository code search without indexer ## Builtin repository code search without indexer
Users could do repository-level code search without setting up a repository indexer. Users can search the code of a single repository without setting up a repository indexer.
The builtin code search is based on the `git grep` command, which is fast and efficient for small repositories. This search uses `git grep`, which is fast for small repositories and requires Git built with PCRE support, as most distributions provide.
Better code search support could be achieved by setting up the repository indexer. Searching across repositories requires the repository indexer.
See [Code Search](../usage/code-search.md) for the query syntax.
## Setting up the repository indexer ## Setting up the repository indexer
+23 -1
View File
@@ -8,7 +8,7 @@ aliases:
# Database Preparation # Database Preparation
You need a database to use Gitea. Gitea supports PostgreSQL (>= 12), MySQL (>= 8.0), MariaDB (>= 10.4), SQLite (builtin), and MSSQL (>= 2012 SP4). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter. You need a database to use Gitea. Gitea supports PostgreSQL (>= 12), MySQL (>= 8.0), MariaDB (>= 10.4), SQLite (builtin), and MSSQL (>= 2012 SP4). This page will guide into preparing database. PostgreSQL, MySQL and MSSQL are covered here. If you plan to use SQLite, you can ignore this chapter.
:::warning :::warning
Converting one database type to another is not a well-tested process and you may experience issues. It is better to choose the final database type at the type of the first installation. Be aware that SQLite does not scale; if you expect your instance to grow at a later time, you should choose another database type. Converting one database type to another is not a well-tested process and you may experience issues. It is better to choose the final database type at the type of the first installation. Be aware that SQLite does not scale; if you expect your instance to grow at a later time, you should choose another database type.
@@ -177,6 +177,28 @@ All steps below requires that the database engine of your choice is installed on
You should be prompted to enter password for the database user, and connected to the database. You should be prompted to enter password for the database user, and connected to the database.
## MSSQL
1. As an administrator, create the login, a database with case-sensitive collation, and its user. Replace the password `'gitea'` with a secure one:
```sql
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
GO
USE giteadb;
CREATE USER gitea FOR LOGIN gitea;
ALTER ROLE db_owner ADD MEMBER gitea;
GO
```
Upgrades change the database schema, so the user needs `db_owner`, or `db_ddladmin`, `db_datareader` and `db_datawriter`. With the latter, also run `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;` as administrator.
2. On your Gitea server, test the connection to the database:
```sh
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
```
## Database Connection over TLS ## Database Connection over TLS
If the communication between Gitea and your database instance is performed through a private network, or if Gitea and the database are running on the same server, this section can be omitted since the security between Gitea and the database instance is not critically exposed. If instead the database instance is on a public network, use TLS to encrypt the connection to the database, as it is possible for third-parties to intercept the traffic data. If the communication between Gitea and your database instance is performed through a private network, or if Gitea and the database are running on the same server, this section can be omitted since the security between Gitea and the database instance is not critically exposed. If instead the database instance is on a public network, use TLS to encrypt the connection to the database, as it is possible for third-parties to intercept the traffic data.
+2 -12
View File
@@ -16,17 +16,7 @@ Gitea Actions is designed to be compatible with GitHub Actions, with the differe
### Action prefixes ### Action prefixes
`uses:` accepts these prefixes: `uses:` accepts the `self:` prefix to reference your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1`.
- `self:` references your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
- `builtin:` runs an action built into Gitea Runner, which needs no download and no Node in the job image, e.g. `uses: builtin:checkout`
`builtin:checkout` accepts the `repository`, `ref`, `token`, `path` and `fetch-depth` inputs of `actions/checkout` with the same defaults, and fails on any other input.
### Workflow-relative actions
`$/` references the repository and commit of the workflow, or of the enclosing composite action, e.g. `uses: $/.gitea/actions/build`.
Unlike `./`, it needs no checkout first.
### Actions written in Go ### Actions written in Go
@@ -92,7 +82,7 @@ See [Actions job token permissions](token-permissions.md).
Actions without a host, like `uses: actions/checkout@v4`, are downloaded from `https://github.com`, or from your own instance when `[actions].DEFAULT_ACTIONS_URL` is `self`. Actions without a host, like `uses: actions/checkout@v4`, are downloaded from `https://github.com`, or from your own instance when `[actions].DEFAULT_ACTIONS_URL` is `self`.
See the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions). See the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions).
For other sources, see [Absolute action URLs](#absolute-action-urls), [Action prefixes](#action-prefixes) and [Workflow-relative actions](#workflow-relative-actions). For other sources, see [Absolute action URLs](#absolute-action-urls) and [Action prefixes](#action-prefixes).
### Context availability ### Context availability
+42
View File
@@ -0,0 +1,42 @@
---
date: "2026-10-29T00:00:00+00:00"
slug: "code-search"
sidebar_position: 50
---
# Code Search
Search code in a single repository with the search box on the repository's code tab. To search across repositories, use the **Code** tab on the explore page or on a user or organization profile. Searching across repositories requires the [repository indexer](../administration/repo-indexer.md).
## Query syntax
A file is found when every term matches its content or its path. Matching ignores case and also finds terms inside longer words, so `port` matches `import`.
| Syntax | Example | Finds files that |
| --- | --- | --- |
| `term` | `getUser` | contain `getUser` |
| `term term` | `user cache` | contain both `user` and `cache` |
| `"phrase"` | `"func main()"` | contain the exact text, including spaces |
| `/regexp/` | `/get\w+User/` | have a line matching the regular expression |
| `path:DIR` | `path:src/utils` | are inside the `src/utils` directory |
| `language:NAME` | `language:go` | are written in Go |
| `repo:OWNER/NAME` | `repo:gitea/tea` | are in the `gitea/tea` repository |
| `user:NAME`, `org:NAME` | `org:gitea` | are in a repository owned by `gitea` |
- `repo:`, `user:` and `org:` only work when searching across repositories. Repeat them to search several, for example `repo:gitea/tea repo:gitea/act`.
- Regular expressions only work when the repository indexer is not enabled. They match one line at a time, so use `\s` for spaces, as a space separates terms.
- `language:` only works with the repository indexer.
- `AND`, `OR`, `NOT`, negated qualifiers like `-path:`, and qualifiers like `content:` or `extension:` are not supported and show an error.
## Results
Each file shows up to 10 snippets with the matches highlighted. Binary files are only found by their path.
Without the repository indexer, a search stops after 50 files and shows a notice. Narrow the query with more terms or `path:` to see the rest.
## API
- `GET /api/v1/repos/{owner}/{repo}/code/search?q=...` searches one repository. Set `ref` to search a branch, tag or commit other than the default branch. It always supports regular expressions, but not `language:`.
- `GET /api/v1/search/code?q=...` searches the default branches of all repositories you can read. It requires the repository indexer and does not support regular expressions.
Both return results in GitHub's format, including `text_matches` with the match positions. Results can be paged up to the 1000th file.
+1
View File
@@ -36,6 +36,7 @@ The following package managers are currently supported:
| [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` | | [RubyGems](usage/packages/rubygems.md) | Ruby | `gem`, `Bundler` |
| [Swift](usage/packages/swift.md) | Swift | `swift` | | [Swift](usage/packages/swift.md) | Swift | `swift` |
| [Terraform](usage/packages/terraform.md) | - | `terraform` | | [Terraform](usage/packages/terraform.md) | - | `terraform` |
| [Terraform Module](usage/packages/terraform-module.md) | - | `terraform`, `terragrunt` |
| [Vagrant](usage/packages/vagrant.md) | - | `vagrant` | | [Vagrant](usage/packages/vagrant.md) | - | `vagrant` |
**The following paragraphs only apply if Packages are not globally disabled!** **The following paragraphs only apply if Packages are not globally disabled!**
+170
View File
@@ -0,0 +1,170 @@
---
date: "2026-06-09T00:00:00+00:00"
slug: "terraform-module"
sidebar_position: 119
---
# Terraform Module Registry
Publish [Terraform](https://www.terraform.io/) modules for your user or organization and use them
from Terraform or Terragrunt. The registry implements the
[HashiCorp module registry protocol](https://developer.hashicorp.com/terraform/internals/module-registry-protocol),
so modules are referenced with the usual `HOST/NAMESPACE/NAME/PROVIDER` address.
## Requirements
- The [Terraform CLI](https://developer.hashicorp.com/terraform/install) or
[Terragrunt](https://terragrunt.gruntwork.io/).
- **Your Gitea instance must be served over HTTPS with a valid certificate.**
Terraform and Terragrunt only perform module registry discovery over HTTPS and reject
plain HTTP — including `http://localhost`. This is a requirement of the protocol, not of Gitea.
A module is addressed by three segments:
| Segment | Meaning |
| ----------- | ------------------------------------------------------------- |
| `namespace` | The owner of the module: a Gitea user or organization name. It must follow the same rules as `name`, so owners with a `.` in their name cannot publish modules. |
| `name` | The module name. Letters, digits, `-` and `_`, starting and ending with a letter or digit, up to 64 characters. |
| `provider` | The main provider the module targets, e.g. `aws`. Lowercase letters and digits, up to 64 characters. |
Versions follow [semantic versioning](https://semver.org/) and are stored in canonical form: a
leading `v` is dropped and missing segments are padded, so `v1.2.3` and `1.2.3` address the same
version, and `1.2` becomes `1.2.0`.
## Packaging a module
A module is published as a single `.tar.gz` archive, stored and served exactly as uploaded. The
module's `.tf` files must therefore be at the **archive root**. A source tarball downloaded from a Git
host wraps everything in a `repository-version/` directory and is rejected — repackage the module
directory's contents instead:
```shell
tar -czf vpc-1.0.0.tar.gz -C path/to/module .
```
The root module's inputs, outputs, providers and `README` are shown on the package page. Each
submodule found under `modules/<name>` is listed with its source address and links to its own page,
which shows the install snippet for that submodule along with its inputs, outputs, providers and
`README`. Only one level is indexed, so `modules/<name>/<nested>` is not listed. Anything else,
including `examples/`, is kept in the archive but is not indexed. A module that is only a collection of
submodules, with no root module, is also accepted. Files in JSON syntax (`.tf.json`) are accepted too,
but only `.tf` files are indexed.
## Authentication
Create a [personal access token](development/api-usage.md#authentication) with the `read:package` scope to download
private modules, and `write:package` to publish or delete them. Add it to your Terraform CLI
configuration file (`~/.terraformrc` or `%APPDATA%/terraform.rc`):
```hcl
credentials "gitea.example.com" {
token = "<your token>"
}
```
Modules owned by a public user or organization can be downloaded without a token.
## Publishing a module
Upload an archive with a `PUT` request, sending the file as the raw request body. Use
`curl --upload-file` rather than `--data-binary`: the latter sends a form content type that
the registry will not accept as an archive.
```shell
curl --user "your_username:your_token" \
--upload-file vpc-1.0.0.tar.gz \
https://gitea.example.com/api/packages/-/terraform/modules/{namespace}/{name}/{provider}/{version}
```
| Parameter | Description |
| ----------- | -------------------------------------- |
| `namespace` | The owner (user or organization). |
| `name` | The module name. |
| `provider` | The provider the module targets. |
| `version` | The module version (semver). |
For example, to publish version `1.0.0` of the `vpc` module for the `aws` provider under the `acme`
organization:
```shell
curl --user "your_username:your_token" \
--upload-file vpc-1.0.0.tar.gz \
https://gitea.example.com/api/packages/-/terraform/modules/acme/vpc/aws/1.0.0
```
A successful upload returns `201 Created`. Published versions are immutable: uploading a version that
already exists returns `409 Conflict`. To replace a version, delete it first.
## Linking a module to a repository
A module always lives in a user or organization's package space — its namespace is that user or
organization, never a repository, because the registry address (`HOST/NAMESPACE/NAME/PROVIDER`) has no
repository segment. You cannot publish "into" a repository. Instead, a repository link is a display
association that surfaces the module on a repository's **Packages** tab. The workflow is:
1. **Publish** the module to the user or organization namespace, exactly as shown in
[Publishing a module](#publishing-a-module).
2. **Link** the package to a repository owned by that same user or organization: open the package,
go to its **Settings**, and select the repository (or use the
`POST /api/v1/packages/{owner}/terraform-module/{name}%2F{provider}/-/link/{repo}` API).
The link applies to the whole module — all of its versions, including ones published later — and can
be changed or removed at any time. It only affects where the module is listed in the UI; the address
used to consume it is unchanged (still `HOST/NAMESPACE/NAME/PROVIDER`, with no repository in it).
## Consuming a module
Reference the module by its registry address. With Terraform:
```hcl
module "vpc" {
source = "gitea.example.com/acme/vpc/aws"
version = "~> 1.0"
}
```
To use a submodule, append its path with the standard `//` separator:
```hcl
module "network" {
source = "gitea.example.com/acme/infra/google//modules/network"
version = "~> 1.0"
}
```
With Terragrunt, use the `tfr://` scheme and pass the version as a query parameter:
```hcl
terraform {
source = "tfr://gitea.example.com/acme/vpc/aws?version=1.0.0"
}
```
`terraform init` (or `terragrunt init`) resolves the address through the service discovery document
at `https://gitea.example.com/.well-known/terraform.json` and downloads the matching version.
## Deleting a version
```shell
curl --user "your_username:your_token" \
--request DELETE \
https://gitea.example.com/api/packages/-/terraform/modules/acme/vpc/aws/1.0.0
```
A successful delete returns `204 No Content`. This requires the `write:package` scope. There is no
separate deprecation flow — deleting a version removes it from the registry.
## Limits
The stored archive is bounded by the instance-wide package limits (`LIMIT_SIZE_TERRAFORM_MODULE` and
`LIMIT_TOTAL_OWNER_SIZE`) set by your Gitea administrator; see the
[configuration cheat sheet](../../administration/config-cheat-sheet.md#packages-packages).
Independently of those settings, an archive may not exceed **32 MiB decompressed**. The registry
reads the whole archive to index it, and stops with `413 Request Entity Too Large` past that ceiling,
so raising `LIMIT_SIZE_TERRAFORM_MODULE` above 32 MiB does not allow larger modules. Real modules are
kilobyte-scale, so this only affects archives carrying unrelated payloads.
A `README` larger than **1 MiB**, of the root module or of a submodule, is not shown on the package
page. The module is still accepted and the file stays in the archive.
+69 -13
View File
@@ -9,25 +9,36 @@ aliases:
# Code Owners # Code Owners
Gitea maintains code owner files. It looks for it in the following locations in this order: Gitea reads the first CODEOWNERS file found at these locations, in order:
- `./CODEOWNERS` - `./CODEOWNERS`
- `./docs/CODEOWNERS` - `./docs/CODEOWNERS`
- `./.gitea/CODEOWNERS` - `./.gitea/CODEOWNERS`
And stops at the first found file. Pull requests use the base branch's rules. File views show owners from the commit
being viewed, including when browsing a branch, tag, or historical commit.
File format: `<regexp rule> <@user or @org/team> [@user or @org/team]...` ## Patterns and owners
Regexp specified in golang Regex format. Each rule contains a pattern followed by users or organization teams.
Regexp can start with `!` for negative rules - match all files except specified.
Patterns starting with `*` or containing `/*` are parsed as glob expressions.
General patterns are parsed as regular expressions.
A leading `!` inverts a match.
Special rule characters like space, backslash and `#` must be escaped with a backslash.
When using regexp, since backslash needs to be escaped in rule level, literal dot should be written as `\\.`
Example file: Example file:
```bash ```text
.*\\.go @user1 @user2 # This is comment *.js @alice @bob # This is an inline comment
doc/*.md @charles # Patterns starting with "*" or containing "/*" are parsed as glob
src/**/db*.py @david # Use "**" to match any-level sub directories
.*\\.go @user1 @user2 # General patterns are parsed as regexp
test\\..*\\.js @user3 # !!! Do remeber: NOT "test.*.js", only regexp can be used for such cases
# Comment too
# You can assigning code owning for users or teams # You can assigning code owning for users or teams
frontend/src/.*\\.js @org1/team1 @org1/team2 @user3 frontend/src/.*\\.js @org1/team1 @org1/team2 @user3
@@ -42,24 +53,69 @@ docs/(aws|google|azure)/[^/]*\\.(md|txt) @user8 @org1/team4
Code owners listed in this file will automatically be requested to review pull requests Code owners listed in this file will automatically be requested to review pull requests
that modify files matching at least one corresponding rule. that modify files matching at least one corresponding rule.
### Escaping ## Sections
You can escape characters `#`, ` ` (space) and `\` with `\`, like: A section heading can supply default owners for the rules that follow it:
```text
[Documentation] @org1/team-doc
*.md
README.md @alice
[Frontend] @bob
*.js
``` ```
Owners on a rule replace the section's default owners. Section names are
case-insensitive; repeated headings belong to the same section. For each file, the
last matching rule in each named section applies. Matching rules outside named
sections retain Gitea's existing behavior: they all apply.
## Review request annotations
Use `## review-request=true` or `## review-request=false` to control automatic
review requests. A line annotation overrides a section annotation, which overrides
the global value. When none is set, individual code owners receive automatic review
requests only if they watch the repository and include pull requests in their watch
preferences. Team-level requests are enabled by default. An explicit `true` requests
a review regardless of the individual owner's watch preferences; `false` disables
automatic requests for the rule.
```text
## review-request=false # global default for following rules
*.js @alice ## review-request=true # only this rule
[Documentation] @org1/team-doc ## review-request=true
*.md
private/* @bob ## review-request=false
```
A standalone annotation changes the global default for subsequent rules.
Annotations on section headings apply until the next heading. Ordinary comments
start with `#`, including comments after annotations.
Disabling review requests keeps code owners visible when viewing a file and
does not waive approvals required by branch protection.
## Escaping
You need to escape characters `#`, ` ` (space) and `\` with backslash `\`, e.g.:
```text
dir/with\#hashtag @user1 dir/with\#hashtag @user1
path\ with\ space @user2 path\ with\ space @user2
path/with\\backslash @user3 path/with\\backslash @user3
``` ```
Some character (`.+*?()|[]{}^$\`) should be escaped with `\\` inside regexp, like: Some regexp characters (`.+*?()|[]{}^$\`) should be escaped with `\\`, e.g.:
``` ```
path/\\.with\\.dots path/\\.with\\.dots
path/with\\+plus path/with\\+plus
``` ```
### Branch Protection Rules ## Branch Protection Rules
When setting up branch protection rules, you may choose to enforce code owner approval of When setting up branch protection rules, you may choose to enforce code owner approval of
modified files. This will block a PR from being merged until at least one code owner modified files. This will block a PR from being merged until at least one code owner
@@ -67,7 +123,7 @@ has given approval for every applicable rule listed in the `CODEOWNERS` file.
For example, say you have the following `CODEOWNERS` file: For example, say you have the following `CODEOWNERS` file:
```bash ```text
.*\\.go @Bob .*\\.go @Bob
.*\\.md @Sally @Chris .*\\.md @Sally @Chris
migrations/.* @Alice migrations/.* @Alice
@@ -141,7 +141,7 @@ aliases:
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: 在默认的 squash 合并消息中,包括构成拉取请求的所有提交的提交消息。 - `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: 在默认的 squash 合并消息中,包括构成拉取请求的所有提交的提交消息。
- `ADD_CO_COMMITTER_TRAILERS`: **true**: 如果提交者与作者不匹配,在合并提交消息中添加`co-authored-by`和`co-committed-by`标记。 - `ADD_CO_COMMITTER_TRAILERS`: **true**: 如果提交者与作者不匹配,在合并提交消息中添加`co-authored-by`和`co-committed-by`标记。
- `RETARGET_CHILDREN_ON_MERGE`: **true**: 当父合并请求被合并时,将子合并请求重新定向到父合并请求的目标分支。仅适用于头分支和基分支指向同一仓库的已合并合并请求。 - `RETARGET_CHILDREN_ON_MERGE`: **true**: 当父合并请求被合并时,将子合并请求重新定向到父合并请求的目标分支。仅适用于头分支和基分支指向同一仓库的已合并合并请求。
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: 为新仓库设置"合并后默认删除合并请求分支"的默认值。 - `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **true**: 为新仓库设置"合并后默认删除合并请求分支"的默认值。
### 仓库 - 工单 (`repository.issue`) ### 仓库 - 工单 (`repository.issue`)
@@ -677,7 +677,6 @@ Gitea 创建以下非唯一队列:
- `ED25519`:**256** - `ED25519`:**256**
- `ECDSA`:**256** - `ECDSA`:**256**
- `RSA`:**3071**: 我们在这里设置为 2047,因为一个其他方面有效的 3072 RSA 密钥可能被报告为 3071 长度。 - `RSA`:**3071**: 我们在这里设置为 2047,因为一个其他方面有效的 3072 RSA 密钥可能被报告为 3071 长度。
- `DSA`:**-1**: 默认情况下禁用 DSA。设置为**1024**以重新启用,但请注意可能需要重新配置您的 SSHD 提供者
## Webhook (`webhook`) ## Webhook (`webhook`)
@@ -8,7 +8,7 @@ aliases:
# 数据库准备 # 数据库准备
在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。由于 PostgreSQL 和 MySQL 在生产环境中被广泛使用,因此本文档将仅涵盖这两种数据库。如果您计划使用 SQLite,则可以忽略本章内容。 在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。本文档涵盖 PostgreSQL、MySQL 和 MSSQL。如果您计划使用 SQLite,则可以忽略本章内容。
如果您使用不受支持的数据库版本,请通过 [联系我们](/help/support) 以获取有关我们的扩展支持的信息。我们可以为旧数据库提供测试和支持,并将这些修复集成到 Gitea 代码库中。 如果您使用不受支持的数据库版本,请通过 [联系我们](/help/support) 以获取有关我们的扩展支持的信息。我们可以为旧数据库提供测试和支持,并将这些修复集成到 Gitea 代码库中。
@@ -168,6 +168,28 @@ aliases:
您应该会被提示输入数据库用户的密码,并连接到数据库。 您应该会被提示输入数据库用户的密码,并连接到数据库。
## MSSQL
1. 以管理员身份创建登录名、使用大小写敏感排序规则的数据库及其用户。请将密码 `'gitea'` 替换为安全的密码:
```sql
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
GO
USE giteadb;
CREATE USER gitea FOR LOGIN gitea;
ALTER ROLE db_owner ADD MEMBER gitea;
GO
```
升级会更改数据库结构,因此该用户需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用后者时,还需以管理员身份执行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
2. 在您的 Gitea 服务器上,测试与数据库的连接:
```sh
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
```
## 使用 TLS 进行数据库连接 ## 使用 TLS 进行数据库连接
如果 Gitea 和您的数据库实例之间的通信是通过私有网络进行的,或者如果 Gitea 和数据库运行在同一台服务器上,那么可以省略本节,因为 Gitea 和数据库实例之间的安全性不会受到严重威胁。但是,如果数据库实例位于公共网络上,请使用 TLS 对数据库连接进行加密,以防止第三方拦截流量数据。 如果 Gitea 和您的数据库实例之间的通信是通过私有网络进行的,或者如果 Gitea 和数据库运行在同一台服务器上,那么可以省略本节,因为 Gitea 和数据库实例之间的安全性不会受到严重威胁。但是,如果数据库实例位于公共网络上,请使用 TLS 对数据库连接进行加密,以防止第三方拦截流量数据。
@@ -18,18 +18,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
<a id="action-prefixes"></a> <a id="action-prefixes"></a>
### Action前缀 ### Action前缀
`uses:`支持以下前缀: `uses:`支持`self:`前缀,用于引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`。
- `self:`引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`
- `builtin:`运行Gitea Runner内置的Action,无需下载,Job镜像中也无需Node,例如`uses: builtin:checkout`
`builtin:checkout`支持`actions/checkout`的`repository`、`ref`、`token`、`path`和`fetch-depth`输入,默认值相同,其他输入会使步骤失败。
<a id="workflow-relative-actions"></a>
### 相对于工作流的Actions
`$/`引用工作流所在的仓库和提交,或外层复合Action所在的仓库和提交,例如`uses: $/.gitea/actions/build`。
与`./`不同,它无需事先检出代码。
### 使用Go编写Actions ### 使用Go编写Actions
@@ -95,7 +84,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。 未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。
请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。 请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)、[Action前缀](#action-prefixes)和[相对于工作流的Actions](#workflow-relative-actions)。 其他来源请参阅[Action URL绝对路径](#absolute-action-urls)和[Action前缀](#action-prefixes)。
### 上下文可用性 ### 上下文可用性
@@ -8,7 +8,7 @@ aliases:
# 数据库准备 # 数据库准备
在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。由于 PostgreSQL 和 MySQL 在生产环境中被广泛使用,因此本文档将仅涵盖这两种数据库。如果您计划使用 SQLite,则可以忽略本章内容。 在使用 Gitea 前,您需要准备一个数据库。Gitea 支持 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(内置) 和 MSSQL(>= 2012 SP4)这几种数据库。本页将指导您准备数据库。本文档涵盖 PostgreSQL、MySQL 和 MSSQL。如果您计划使用 SQLite,则可以忽略本章内容。
如果您使用不受支持的数据库版本,请通过 [联系我们](/help/support) 以获取有关我们的扩展支持的信息。我们可以为旧数据库提供测试和支持,并将这些修复集成到 Gitea 代码库中。 如果您使用不受支持的数据库版本,请通过 [联系我们](/help/support) 以获取有关我们的扩展支持的信息。我们可以为旧数据库提供测试和支持,并将这些修复集成到 Gitea 代码库中。
@@ -168,6 +168,28 @@ aliases:
您应该会被提示输入数据库用户的密码,并连接到数据库。 您应该会被提示输入数据库用户的密码,并连接到数据库。
## MSSQL
1. 以管理员身份创建登录名、使用大小写敏感排序规则的数据库及其用户。请将密码 `'gitea'` 替换为安全的密码:
```sql
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
GO
USE giteadb;
CREATE USER gitea FOR LOGIN gitea;
ALTER ROLE db_owner ADD MEMBER gitea;
GO
```
升级会更改数据库结构,因此该用户需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用后者时,还需以管理员身份执行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
2. 在您的 Gitea 服务器上,测试与数据库的连接:
```sh
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
```
## 使用 TLS 进行数据库连接 ## 使用 TLS 进行数据库连接
如果 Gitea 和您的数据库实例之间的通信是通过私有网络进行的,或者如果 Gitea 和数据库运行在同一台服务器上,那么可以省略本节,因为 Gitea 和数据库实例之间的安全性不会受到严重威胁。但是,如果数据库实例位于公共网络上,请使用 TLS 对数据库连接进行加密,以防止第三方拦截流量数据。 如果 Gitea 和您的数据库实例之间的通信是通过私有网络进行的,或者如果 Gitea 和数据库运行在同一台服务器上,那么可以省略本节,因为 Gitea 和数据库实例之间的安全性不会受到严重威胁。但是,如果数据库实例位于公共网络上,请使用 TLS 对数据库连接进行加密,以防止第三方拦截流量数据。
@@ -21,15 +21,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
`uses:`支持以下前缀: `uses:`支持以下前缀:
- `self:`引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1` - `self:`引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`
- `builtin:`运行Gitea Runner内置的Action,无需下载,Job镜像中也无需Node,例如`uses: builtin:checkout` - `builtin:`运行Gitea Runner内置的Action,无需下载,也不依赖Node.js,例如`uses: builtin:checkout`
`builtin:checkout`支持`actions/checkout`的`repository`、`ref`、`token`、`path`和`fetch-depth`输入,默认值相同,其他输入会使步骤失败。
<a id="workflow-relative-actions"></a>
### 相对于工作流的Actions
`$/`引用工作流所在的仓库和提交,或外层复合Action所在的仓库和提交,例如`uses: $/.gitea/actions/build`。
与`./`不同,它无需事先检出代码。
### 使用Go编写Actions ### 使用Go编写Actions
@@ -95,7 +87,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。 未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。
请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。 请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)、[Action前缀](#action-prefixes)和[相对于工作流的Actions](#workflow-relative-actions)。 其他来源请参阅[Action URL绝对路径](#absolute-action-urls)和[Action前缀](#action-prefixes)。
### 上下文可用性 ### 上下文可用性
@@ -142,7 +142,7 @@ aliases:
- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: 在預設的 squash 合併消息中,包括構成拉取請求的所有提交的提交消息。 - `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: 在預設的 squash 合併消息中,包括構成拉取請求的所有提交的提交消息。
- `ADD_CO_COMMITTER_TRAILERS`: **true**: 如果提交者與作者不匹配,在合併提交消息中添加`co-authored-by`和`co-committed-by`標記。 - `ADD_CO_COMMITTER_TRAILERS`: **true**: 如果提交者與作者不匹配,在合併提交消息中添加`co-authored-by`和`co-committed-by`標記。
- `RETARGET_CHILDREN_ON_MERGE`: **true**: 當父合併請求被合併時,將子合併請求重新定向到父合併請求的目標分支。僅適用於頭分支和基分支指向同一儲存庫的已合併合併請求。 - `RETARGET_CHILDREN_ON_MERGE`: **true**: 當父合併請求被合併時,將子合併請求重新定向到父合併請求的目標分支。僅適用於頭分支和基分支指向同一儲存庫的已合併合併請求。
- `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **false**: 為新儲存庫設定"合併後預設刪除合併請求分支"的預設值。 - `DEFAULT_DELETE_BRANCH_AFTER_MERGE`: **true**: 為新儲存庫設定"合併後預設刪除合併請求分支"的預設值。
### 儲存庫 - 工單 (`repository.issue`) ### 儲存庫 - 工單 (`repository.issue`)
@@ -682,7 +682,6 @@ Gitea 建立以下非唯一隊列:
- `ED25519`:**256** - `ED25519`:**256**
- `ECDSA`:**256** - `ECDSA`:**256**
- `RSA`:**3071**: 我們在這裡設定為 2047,因為一個其他方面有效的 3072 RSA 密鑰可能被報告為 3071 長度。 - `RSA`:**3071**: 我們在這裡設定為 2047,因為一個其他方面有效的 3072 RSA 密鑰可能被報告為 3071 長度。
- `DSA`:**-1**: 預設情況下禁用 DSA。設定為**1024**以重新啟用,但請注意可能需要重新設定您的 SSHD 提供者
## Webhook (`webhook`) ## Webhook (`webhook`)
@@ -8,7 +8,7 @@ aliases:
# 資料庫準備 # 資料庫準備
在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。由於 PostgreSQL 和 MySQL 在生產環境中被廣泛使用,因此本文件將僅涵蓋這兩種資料庫。如果您計劃使用 SQLite,則可以忽略本章內容。 在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。本文件涵蓋 PostgreSQL、MySQL 和 MSSQL。如果您計劃使用 SQLite,則可以忽略本章內容。
如果您使用不受支援的資料庫版本,請通過 [聯繫我們](/help/support) 以獲取有關我們的擴展支援的資訊。我們可以為舊資料庫提供測試和支援,並將這些修復整合到 Gitea 程式碼庫中。 如果您使用不受支援的資料庫版本,請通過 [聯繫我們](/help/support) 以獲取有關我們的擴展支援的資訊。我們可以為舊資料庫提供測試和支援,並將這些修復整合到 Gitea 程式碼庫中。
@@ -168,6 +168,28 @@ aliases:
您應該會被提示輸入資料庫使用者的密碼,並連接到資料庫。 您應該會被提示輸入資料庫使用者的密碼,並連接到資料庫。
## MSSQL
1. 以管理員身份建立登入名稱、使用大小寫敏感排序規則的資料庫及其使用者。請將密碼 `'gitea'` 替換為安全的密碼:
```sql
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
GO
USE giteadb;
CREATE USER gitea FOR LOGIN gitea;
ALTER ROLE db_owner ADD MEMBER gitea;
GO
```
升級會更改資料庫結構,因此該使用者需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用後者時,還需以管理員身份執行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
2. 在您的 Gitea 伺服器上,測試與資料庫的連接:
```sh
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
```
## 使用 TLS 進行資料庫連接 ## 使用 TLS 進行資料庫連接
如果 Gitea 和您的資料庫實例之間的通信是通過私有網路進行的,或者如果 Gitea 和資料庫運行在同一臺伺服器上,那麼可以省略本節,因為 Gitea 和資料庫實例之間的安全性不會受到嚴重威脅。但是,如果資料庫實例位於公共網路上,請使用 TLS 對資料庫連接進行加密,以防止第三方攔截流量資料。 如果 Gitea 和您的資料庫實例之間的通信是通過私有網路進行的,或者如果 Gitea 和資料庫運行在同一臺伺服器上,那麼可以省略本節,因為 Gitea 和資料庫實例之間的安全性不會受到嚴重威脅。但是,如果資料庫實例位於公共網路上,請使用 TLS 對資料庫連接進行加密,以防止第三方攔截流量資料。
@@ -18,18 +18,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
<a id="action-prefixes"></a> <a id="action-prefixes"></a>
### Action 前綴 ### Action 前綴
`uses:` 接受以下前綴: `uses:` 接受 `self:` 前綴,用於參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`。
- `self:` 參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,Job 映像檔中也不需要 Node,例如 `uses: builtin:checkout`
`builtin:checkout` 支援 `actions/checkout` 的 `repository`、`ref`、`token`、`path` 和 `fetch-depth` 輸入,預設值相同,其他輸入會使步驟失敗。
<a id="workflow-relative-actions"></a>
### 相對於工作流的 Actions
`$/` 參照工作流(或外層複合 Action)所在的儲存庫與提交,例如 `uses: $/.gitea/actions/build`。
與 `./` 不同,它不需要事先簽出程式碼。
### 使用Go編寫Actions ### 使用Go編寫Actions
@@ -95,7 +84,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。 未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。
請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。 請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)、[Action 前綴](#action-prefixes)和[相對於工作流的 Actions](#workflow-relative-actions)。 其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)和[Action 前綴](#action-prefixes)。
### 上下文可用性 ### 上下文可用性
@@ -8,7 +8,7 @@ aliases:
# 資料庫準備 # 資料庫準備
在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。由於 PostgreSQL 和 MySQL 在生產環境中被廣泛使用,因此本文件將僅涵蓋這兩種資料庫。如果您計劃使用 SQLite,則可以忽略本章內容。 在使用 Gitea 前,您需要準備一個資料庫。Gitea 支援 PostgreSQL(>= 12)、MySQL(>= 8.0)、MariaDB(>= 10.4)、SQLite(內置) 和 MSSQL(>= 2012 SP4)這幾種資料庫。本頁將指導您準備資料庫。本文件涵蓋 PostgreSQL、MySQL 和 MSSQL。如果您計劃使用 SQLite,則可以忽略本章內容。
如果您使用不受支援的資料庫版本,請通過 [聯繫我們](/help/support) 以獲取有關我們的擴展支援的資訊。我們可以為舊資料庫提供測試和支援,並將這些修復整合到 Gitea 程式碼庫中。 如果您使用不受支援的資料庫版本,請通過 [聯繫我們](/help/support) 以獲取有關我們的擴展支援的資訊。我們可以為舊資料庫提供測試和支援,並將這些修復整合到 Gitea 程式碼庫中。
@@ -168,6 +168,28 @@ aliases:
您應該會被提示輸入資料庫使用者的密碼,並連接到資料庫。 您應該會被提示輸入資料庫使用者的密碼,並連接到資料庫。
## MSSQL
1. 以管理員身份建立登入名稱、使用大小寫敏感排序規則的資料庫及其使用者。請將密碼 `'gitea'` 替換為安全的密碼:
```sql
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
GO
USE giteadb;
CREATE USER gitea FOR LOGIN gitea;
ALTER ROLE db_owner ADD MEMBER gitea;
GO
```
升級會更改資料庫結構,因此該使用者需要 `db_owner`,或者 `db_ddladmin`、`db_datareader` 和 `db_datawriter`。使用後者時,還需以管理員身份執行 `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;`。
2. 在您的 Gitea 伺服器上,測試與資料庫的連接:
```sh
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
```
## 使用 TLS 進行資料庫連接 ## 使用 TLS 進行資料庫連接
如果 Gitea 和您的資料庫實例之間的通信是通過私有網路進行的,或者如果 Gitea 和資料庫運行在同一臺伺服器上,那麼可以省略本節,因為 Gitea 和資料庫實例之間的安全性不會受到嚴重威脅。但是,如果資料庫實例位於公共網路上,請使用 TLS 對資料庫連接進行加密,以防止第三方攔截流量資料。 如果 Gitea 和您的資料庫實例之間的通信是通過私有網路進行的,或者如果 Gitea 和資料庫運行在同一臺伺服器上,那麼可以省略本節,因為 Gitea 和資料庫實例之間的安全性不會受到嚴重威脅。但是,如果資料庫實例位於公共網路上,請使用 TLS 對資料庫連接進行加密,以防止第三方攔截流量資料。
@@ -21,15 +21,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
`uses:` 接受以下前綴: `uses:` 接受以下前綴:
- `self:` 參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1` - `self:` 參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,Job 映像檔中也不需要 Node,例如 `uses: builtin:checkout` - `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,也不依賴 Node.js,例如 `uses: builtin:checkout`
`builtin:checkout` 支援 `actions/checkout` 的 `repository`、`ref`、`token`、`path` 和 `fetch-depth` 輸入,預設值相同,其他輸入會使步驟失敗。
<a id="workflow-relative-actions"></a>
### 相對於工作流的 Actions
`$/` 參照工作流(或外層複合 Action)所在的儲存庫與提交,例如 `uses: $/.gitea/actions/build`。
與 `./` 不同,它不需要事先簽出程式碼。
### 使用Go編寫Actions ### 使用Go編寫Actions
@@ -95,7 +87,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。 未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。
請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。 請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)、[Action 前綴](#action-prefixes)和[相對於工作流的 Actions](#workflow-relative-actions)。 其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)和[Action 前綴](#action-prefixes)。
### 上下文可用性 ### 上下文可用性
+1 -1
View File
@@ -13,5 +13,5 @@
"engines": { "engines": {
"node": ">=22" "node": ">=22"
}, },
"packageManager": "[email protected]6.1" "packageManager": "[email protected]7.0"
} }
+446 -215
View File
File diff suppressed because it is too large. Load diff
-1
View File
@@ -23,7 +23,6 @@ Jobs need these tools wherever steps run, in the job image or on the host:
- `bash` or `sh` for `run` steps, or `pwsh` or `powershell` on Windows. - `bash` or `sh` for `run` steps, or `pwsh` or `powershell` on Windows.
- `node` for JavaScript actions and `hashFiles()`. - `node` for JavaScript actions and `hashFiles()`.
- `git` 2.34.1 or later for [`builtin:checkout`](jobs.md#built-in-checkout), plus `git-lfs` for its `lfs` input and `ssh` for its `ssh-key` input.
## Where jobs run ## Where jobs run
+34 -11
View File
@@ -84,7 +84,16 @@ For jobs in containers, give the `gitea-runner` user access to the Docker daemon
## launchd (macOS) ## launchd (macOS)
Adjust the paths and user for your setup, then save this file as `/Library/LaunchDaemons/com.gitea.runner.plist`: On macOS, run the runner in the login session of the user that jobs should run as. Jobs then have that user's login keychain and the GUI.
Register the runner as that user, with a [host label](../labels.md) so that jobs run on the Mac itself:
```bash
mkdir ~/gitea-runner && cd ~/gitea-runner
gitea-runner register --instance https://gitea.example.com --token <token> --labels macos-latest:host
```
Replace `/Users/gitea-runner` with the user's home directory, then save this file as `~/Library/LaunchAgents/com.gitea.runner.plist`:
```xml ```xml
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
@@ -97,22 +106,16 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
<array> <array>
<string>/usr/local/bin/gitea-runner</string> <string>/usr/local/bin/gitea-runner</string>
<string>daemon</string> <string>daemon</string>
<string>--config</string>
<string>/etc/gitea-runner/config.yaml</string>
</array> </array>
<key>UserName</key>
<string>_gitea-runner</string>
<key>WorkingDirectory</key> <key>WorkingDirectory</key>
<string>/var/lib/gitea-runner</string> <string>/Users/gitea-runner/gitea-runner</string>
<key>EnvironmentVariables</key> <key>EnvironmentVariables</key>
<dict> <dict>
<key>PATH</key> <key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<key>HOME</key>
<string>/var/lib/gitea-runner</string>
</dict> </dict>
<key>StandardErrorPath</key> <key>StandardErrorPath</key>
<string>/var/lib/gitea-runner/runner.log</string> <string>/Users/gitea-runner/gitea-runner/runner.log</string>
<key>RunAtLoad</key> <key>RunAtLoad</key>
<true/> <true/>
<key>KeepAlive</key> <key>KeepAlive</key>
@@ -121,10 +124,30 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
</plist> </plist>
``` ```
Start the runner. From now on, it also starts whenever the user logs in:
```bash ```bash
sudo launchctl bootstrap system /Library/LaunchDaemons/com.gitea.runner.plist launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.gitea.runner.plist
``` ```
Enable automatic login for the user in System Settings, so that the runner starts after a restart too. macOS does not offer automatic login while FileVault is on.
The runner does not get the environment of your shell. Set what jobs need, such as [proxy settings](../proxy.md), in `EnvironmentVariables`.
### Local network access
macOS blocks a runner that was started this way from other hosts on the Mac's own subnet, such as the Gitea instance or a shared cache server. The runner then logs `no route to host`. Commands run in Terminal or over SSH are not blocked, so registering works even when the running runner cannot connect. See [local network privacy](https://developer.apple.com/documentation/technotes/tn3179-understanding-local-network-privacy).
macOS asks on the Mac's screen whether to allow the access. To allow it without that prompt, exempt the subnet on macOS 15.5 or later and restart the Mac. On Wi-Fi, the key is `AllowedWiFiLocalNetworkAddresses`:
```bash
sudo defaults write com.apple.network.local-network AllowedEthernetLocalNetworkAddresses -array "192.168.1.0/24"
```
### Git credentials
Git on macOS saves credentials from remote URLs to the keychain, which can stop a job at a dialog that nobody answers. To turn that off, set `GIT_CONFIG_NOSYSTEM` to `1` in `EnvironmentVariables`.
## Windows ## Windows
Run `gitea-runner daemon` with a service wrapper such as [WinSW](https://github.com/winsw/winsw). The runner has no service installer of its own. Run `gitea-runner daemon` with a service wrapper such as [WinSW](https://github.com/winsw/winsw). The runner has no service installer of its own.
-4
View File
@@ -68,10 +68,6 @@ Setup actions such as `actions/setup-go` install tools in `/opt/hostedtoolcache`
With `none`, include tools in the job image at `/opt/hostedtoolcache/<tool>/<version>/<arch>`. Place an empty `<arch>.complete` file next to the directory. The `-full` variant of the [runner images](https://gitea.com/gitea/runner-images) includes its tools this way. With `none`, include tools in the job image at `/opt/hostedtoolcache/<tool>/<version>/<arch>`. Place an empty `<arch>.complete` file next to the directory. The `-full` variant of the [runner images](https://gitea.com/gitea/runner-images) includes its tools this way.
## Built-in checkout
`uses: builtin:checkout` checks out the repository like `actions/checkout`. It does not download an action or require Node in the job image. It runs `git` in the job. See [Requirements](index.md#requirements) and the inputs listed in [builtin-actions.md](https://gitea.com/gitea/runner/src/branch/main/docs/builtin-actions.md).
## Secrets ## Secrets
The runner masks secrets and `::add-mask::` values in job logs, job summaries, and the names of containers it creates. The runner does not send job outputs that contain a secret. A `needs.<job>.outputs.<name>` expression that reads such an output is empty. The runner masks secrets and `::add-mask::` values in job logs, job summaries, and the names of containers it creates. The runner does not send job outputs that contain a secret. A `needs.<job>.outputs.<name>` expression that reads such an output is empty.
+22 -6
View File
@@ -57,6 +57,12 @@ runner:
# PEM client certificate and key for a Gitea instance that requires mutual TLS. # PEM client certificate and key for a Gitea instance that requires mutual TLS.
#client_cert_file: /etc/gitea-runner/client.crt #client_cert_file: /etc/gitea-runner/client.crt
#client_key_file: /etc/gitea-runner/client.key #client_key_file: /etc/gitea-runner/client.key
# PEM CA certificates of a Gitea instance with a private CA, trusted besides the system's.
# Runner-side git and builtin:checkout use it instead of the system's bundle for the instance.
# Jobs get it at /var/run/act/ca.crt, or in their act directory on the host, with NODE_EXTRA_CA_CERTS
# pointing there unless the job, or on Docker its image, sets it. Other tools in jobs, such as the
# git that actions/checkout runs, need the CA in the image's bundle, for example via container.volumes.
#ca_file: /etc/gitea-runner/ca.crt
# The timeout for fetching the job from the Gitea instance. # The timeout for fetching the job from the Gitea instance.
# Values above the 60s RPC timeout are capped to it. # Values above the 60s RPC timeout are capped to it.
#fetch_timeout: 5s #fetch_timeout: 5s
@@ -126,6 +132,7 @@ runner:
# If it's empty when execute `daemon`, will use labels in `.runner` file. # If it's empty when execute `daemon`, will use labels in `.runner` file.
#labels: #labels:
# - "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest" # - "ubuntu-latest:docker://docker.gitea.com/runner-images:ubuntu-latest"
# - "ubuntu-26.04:docker://docker.gitea.com/runner-images:ubuntu-26.04"
# - "ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04" # - "ubuntu-24.04:docker://docker.gitea.com/runner-images:ubuntu-24.04"
# - "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04" # - "ubuntu-22.04:docker://docker.gitea.com/runner-images:ubuntu-22.04"
# Allocate a pseudo-TTY for each step's process. Applies to both host and docker backends. # Allocate a pseudo-TTY for each step's process. Applies to both host and docker backends.
@@ -219,8 +226,8 @@ cache:
# How the cache server discards entries, ignored when external_server or s3 is set since # How the cache server discards entries, ignored when external_server or s3 is set since
# those apply their own. Leave a setting out for its default; 0s or 0 turns the three # those apply their own. Leave a setting out for its default; 0s or 0 turns the three
# limits off. Sizes accept 10GB, 512mb, 1TiB or a plain byte count, binary either way. # limits off. Sizes accept 10GB, 512mb, 1TiB or a plain byte count, binary either way.
# Whatever these allow, the cache still sheds entries to keep free space on its volume # Whatever these allow, the cache still sheds entries to keep free space on its volume, room
# above health_check.min_free_disk_space_mb when health checks are enabled. # for uploads included, above health_check.min_free_disk_space_mb when health checks are enabled.
# Remove entries nothing has read or written within this window. Only last access counts. # Remove entries nothing has read or written within this window. Only last access counts.
#retention: 168h #retention: 168h
# Cap one repository, removing its least recently accessed entries until it fits. An entry # Cap one repository, removing its least recently accessed entries until it fits. An entry
@@ -277,6 +284,15 @@ container:
# valid_volumes: # valid_volumes:
# - '**' # - '**'
#valid_volumes: [] #valid_volumes: []
# Volumes and bind mounts the runner adds to every job, service and docker action container, as in
# `docker run --volume`, with sources on the docker daemon's host. One the workflow mounts on the same
# container path takes its place. Their sources need no valid_volumes entry, and workflow volumes may
# use them only with the same access, though a job given the docker socket can mount anything.
# Docker only, use pod_template on Kubernetes. For example, to trust a private CA in Debian and
# Ubuntu based images:
# volumes:
# - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
#volumes: []
# Overrides the docker client host with the specified one. # Overrides the docker client host with the specified one.
# If it's empty, runner will find an available docker host automatically. # If it's empty, runner will find an available docker host automatically.
# If it's "-", runner will find an available docker host automatically, but won't mount it into the job and action containers. # If it's "-", runner will find an available docker host automatically, but won't mount it into the job and action containers.
@@ -304,8 +320,8 @@ container:
# healthy. A negative value (e.g. -1s) starts the steps without waiting. # healthy. A negative value (e.g. -1s) starts the steps without waiting.
#service_ready_timeout: 5m #service_ready_timeout: 5m
# Remove the containers, networks and volumes a job creates through its Docker proxy when # Remove the containers, networks and volumes a job creates through its Docker proxy when
# the job ends. Set to false when jobs deploy services to the runner's Docker daemon. # the job ends. Leave off when jobs deploy services to the runner's Docker daemon.
#sweep: true #sweep: false
host: host:
# The parent directory of a job's working directory. # The parent directory of a job's working directory.
@@ -340,8 +356,8 @@ health_check:
# Minimum free space required on the filesystem holding runner workspaces. # Minimum free space required on the filesystem holding runner workspaces.
# Defaults to 1024 MiB when omitted or set to zero. # Defaults to 1024 MiB when omitted or set to zero.
#min_free_disk_space_mb: 1024 #min_free_disk_space_mb: 1024
# Optional additional executable. A non-zero exit, timeout, or startup failure # Optional additional executable, or a .bat or .cmd file on Windows. A non-zero
# marks the runner unavailable. # exit, timeout, or startup failure marks the runner unavailable.
#script: '' #script: ''
# How long a script result is cached and its maximum execution time. # How long a script result is cached and its maximum execution time.
#interval: 30s #interval: 30s
+4
View File
@@ -14,6 +14,10 @@ sudo systemctl start gitea-runner
Stopping the runner cancels running jobs unless `runner.shutdown_timeout` gives them time to finish. The runner logs a warning for unknown configuration keys and ignores them. Run `gitea-runner config generate` to list all configuration options. Stopping the runner cancels running jobs unless `runner.shutdown_timeout` gives them time to finish. The runner logs a warning for unknown configuration keys and ignores them. Run `gitea-runner config generate` to list all configuration options.
## Breaking changes in 6.0
- **`builtin:checkout` is removed.** Steps that use it fail. Use `actions/checkout` or a lightweight action such as [`taiki-e/checkout-action`](https://github.com/taiki-e/checkout-action).
## Breaking changes in 5.0 ## Breaking changes in 5.0
- **Git 2.34.1 or later is required** on the runner and in job images that use `builtin:checkout`. - **Git 2.34.1 or later is required** on the runner and in job images that use `builtin:checkout`.
@@ -26,7 +26,7 @@ Config files are read leniently: keys the running version does not know are repo
### Also new ### Also new
- `builtin:checkout`, which needs neither a download nor Node in the job image, see [docs/builtin-actions.md](https://gitea.com/gitea/runner/src/branch/main/docs/builtin-actions.md), and the `self:` prefix for actions hosted on the runner's own instance. - `builtin:checkout`, which needs neither a download nor Node in the job image, see [docs/builtin-actions.md](https://gitea.com/gitea/runner/src/tag/v4.1.0/docs/builtin-actions.md), and the `self:` prefix for actions hosted on the runner's own instance.
- S3-compatible storage as a cache backend (`cache.s3` in the [example configuration](reference/config-example.md)), shared between runners without a cache server. - S3-compatible storage as a cache backend (`cache.s3` in the [example configuration](reference/config-example.md)), shared between runners without a cache server.
- [OpenTelemetry tracing](monitoring.md#opentelemetry-tracing) of jobs and steps, and from `4.1` the Prometheus metrics exported through OpenTelemetry as well. - [OpenTelemetry tracing](monitoring.md#opentelemetry-tracing) of jobs and steps, and from `4.1` the Prometheus metrics exported through OpenTelemetry as well.
- A Kubernetes backend that runs jobs as pods (`4.1`), see [docs/kubernetes.md](https://gitea.com/gitea/runner/src/branch/main/docs/kubernetes.md). - A Kubernetes backend that runs jobs as pods (`4.1`), see [docs/kubernetes.md](https://gitea.com/gitea/runner/src/branch/main/docs/kubernetes.md).
@@ -84,7 +84,16 @@ For jobs in containers, give the `gitea-runner` user access to the Docker daemon
## launchd (macOS) ## launchd (macOS)
Adjust the paths and user for your setup, then save this file as `/Library/LaunchDaemons/com.gitea.runner.plist`: On macOS, run the runner in the login session of the user that jobs should run as. Jobs then have that user's login keychain and the GUI.
Register the runner as that user, with a [host label](../labels.md) so that jobs run on the Mac itself:
```bash
mkdir ~/gitea-runner && cd ~/gitea-runner
gitea-runner register --instance https://gitea.example.com --token <token> --labels macos-latest:host
```
Replace `/Users/gitea-runner` with the user's home directory, then save this file as `~/Library/LaunchAgents/com.gitea.runner.plist`:
```xml ```xml
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
@@ -97,22 +106,16 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
<array> <array>
<string>/usr/local/bin/gitea-runner</string> <string>/usr/local/bin/gitea-runner</string>
<string>daemon</string> <string>daemon</string>
<string>--config</string>
<string>/etc/gitea-runner/config.yaml</string>
</array> </array>
<key>UserName</key>
<string>_gitea-runner</string>
<key>WorkingDirectory</key> <key>WorkingDirectory</key>
<string>/var/lib/gitea-runner</string> <string>/Users/gitea-runner/gitea-runner</string>
<key>EnvironmentVariables</key> <key>EnvironmentVariables</key>
<dict> <dict>
<key>PATH</key> <key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string> <string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<key>HOME</key>
<string>/var/lib/gitea-runner</string>
</dict> </dict>
<key>StandardErrorPath</key> <key>StandardErrorPath</key>
<string>/var/lib/gitea-runner/runner.log</string> <string>/Users/gitea-runner/gitea-runner/runner.log</string>
<key>RunAtLoad</key> <key>RunAtLoad</key>
<true/> <true/>
<key>KeepAlive</key> <key>KeepAlive</key>
@@ -121,10 +124,30 @@ Adjust the paths and user for your setup, then save this file as `/Library/Launc
</plist> </plist>
``` ```
Start the runner. From now on, it also starts whenever the user logs in:
```bash ```bash
sudo launchctl bootstrap system /Library/LaunchDaemons/com.gitea.runner.plist launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.gitea.runner.plist
``` ```
Enable automatic login for the user in System Settings, so that the runner starts after a restart too. macOS does not offer automatic login while FileVault is on.
The runner does not get the environment of your shell. Set what jobs need, such as [proxy settings](../proxy.md), in `EnvironmentVariables`.
### Local network access
macOS blocks a runner that was started this way from other hosts on the Mac's own subnet, such as the Gitea instance or a shared cache server. The runner then logs `no route to host`. Commands run in Terminal or over SSH are not blocked, so registering works even when the running runner cannot connect. See [local network privacy](https://developer.apple.com/documentation/technotes/tn3179-understanding-local-network-privacy).
macOS asks on the Mac's screen whether to allow the access. To allow it without that prompt, exempt the subnet on macOS 15.5 or later and restart the Mac. On Wi-Fi, the key is `AllowedWiFiLocalNetworkAddresses`:
```bash
sudo defaults write com.apple.network.local-network AllowedEthernetLocalNetworkAddresses -array "192.168.1.0/24"
```
### Git credentials
Git on macOS saves credentials from remote URLs to the keychain, which can stop a job at a dialog that nobody answers. To turn that off, set `GIT_CONFIG_NOSYSTEM` to `1` in `EnvironmentVariables`.
## Windows ## Windows
Run `gitea-runner daemon` with a service wrapper such as [WinSW](https://github.com/winsw/winsw). The runner has no service installer of its own. Run `gitea-runner daemon` with a service wrapper such as [WinSW](https://github.com/winsw/winsw). The runner has no service installer of its own.
+1 -1
View File
@@ -70,7 +70,7 @@ With `none`, include tools in the job image at `/opt/hostedtoolcache/<tool>/<ver
## Built-in checkout ## Built-in checkout
`uses: builtin:checkout` checks out the repository like `actions/checkout`. It does not download an action or require Node in the job image. It runs `git` in the job. See [Requirements](index.md#requirements) and the inputs listed in [builtin-actions.md](https://gitea.com/gitea/runner/src/branch/main/docs/builtin-actions.md). `uses: builtin:checkout` checks out the repository like `actions/checkout`. It does not download an action or require Node in the job image. It runs `git` in the job. See [Requirements](index.md#requirements) and the inputs listed in [builtin-actions.md](https://gitea.com/gitea/runner/src/tag/v5.4.1/docs/builtin-actions.md).
## Secrets ## Secrets
@@ -57,6 +57,12 @@ runner:
# PEM client certificate and key for a Gitea instance that requires mutual TLS. # PEM client certificate and key for a Gitea instance that requires mutual TLS.
#client_cert_file: /etc/gitea-runner/client.crt #client_cert_file: /etc/gitea-runner/client.crt
#client_key_file: /etc/gitea-runner/client.key #client_key_file: /etc/gitea-runner/client.key
# PEM CA certificates of a Gitea instance with a private CA, trusted besides the system's.
# Runner-side git and builtin:checkout use it instead of the system's bundle for the instance.
# Jobs get it at /var/run/act/ca.crt, or in their act directory on the host, with NODE_EXTRA_CA_CERTS
# pointing there unless the job, or on Docker its image, sets it. Other tools in jobs, such as the
# git that actions/checkout runs, need the CA in the image's bundle, for example via container.volumes.
#ca_file: /etc/gitea-runner/ca.crt
# The timeout for fetching the job from the Gitea instance. # The timeout for fetching the job from the Gitea instance.
# Values above the 60s RPC timeout are capped to it. # Values above the 60s RPC timeout are capped to it.
#fetch_timeout: 5s #fetch_timeout: 5s
@@ -219,8 +225,8 @@ cache:
# How the cache server discards entries, ignored when external_server or s3 is set since # How the cache server discards entries, ignored when external_server or s3 is set since
# those apply their own. Leave a setting out for its default; 0s or 0 turns the three # those apply their own. Leave a setting out for its default; 0s or 0 turns the three
# limits off. Sizes accept 10GB, 512mb, 1TiB or a plain byte count, binary either way. # limits off. Sizes accept 10GB, 512mb, 1TiB or a plain byte count, binary either way.
# Whatever these allow, the cache still sheds entries to keep free space on its volume # Whatever these allow, the cache still sheds entries to keep free space on its volume, room
# above health_check.min_free_disk_space_mb when health checks are enabled. # for uploads included, above health_check.min_free_disk_space_mb when health checks are enabled.
# Remove entries nothing has read or written within this window. Only last access counts. # Remove entries nothing has read or written within this window. Only last access counts.
#retention: 168h #retention: 168h
# Cap one repository, removing its least recently accessed entries until it fits. An entry # Cap one repository, removing its least recently accessed entries until it fits. An entry
@@ -277,6 +283,15 @@ container:
# valid_volumes: # valid_volumes:
# - '**' # - '**'
#valid_volumes: [] #valid_volumes: []
# Volumes and bind mounts the runner adds to every job, service and docker action container, as in
# `docker run --volume`, with sources on the docker daemon's host. One the workflow mounts on the same
# container path takes its place. Their sources need no valid_volumes entry, and workflow volumes may
# use them only with the same access, though a job given the docker socket can mount anything.
# Docker only, use pod_template on Kubernetes. For example, to trust a private CA in Debian and
# Ubuntu based images:
# volumes:
# - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
#volumes: []
# Overrides the docker client host with the specified one. # Overrides the docker client host with the specified one.
# If it's empty, runner will find an available docker host automatically. # If it's empty, runner will find an available docker host automatically.
# If it's "-", runner will find an available docker host automatically, but won't mount it into the job and action containers. # If it's "-", runner will find an available docker host automatically, but won't mount it into the job and action containers.
@@ -304,8 +319,8 @@ container:
# healthy. A negative value (e.g. -1s) starts the steps without waiting. # healthy. A negative value (e.g. -1s) starts the steps without waiting.
#service_ready_timeout: 5m #service_ready_timeout: 5m
# Remove the containers, networks and volumes a job creates through its Docker proxy when # Remove the containers, networks and volumes a job creates through its Docker proxy when
# the job ends. Set to false when jobs deploy services to the runner's Docker daemon. # the job ends. Leave off when jobs deploy services to the runner's Docker daemon.
#sweep: true #sweep: false
host: host:
# The parent directory of a job's working directory. # The parent directory of a job's working directory.
@@ -319,6 +334,18 @@ kubernetes:
#pod_template: {} #pod_template: {}
# Pod templates merged over pod_template, in runs-on order, for jobs whose runs-on has the label they are keyed by. # Pod templates merged over pod_template, in runs-on order, for jobs whose runs-on has the label they are keyed by.
#pod_templates: {} #pod_templates: {}
# Have job pods fetch directories, such as actions, and copies of 64 KiB or more gzipped from the runner over the pod network,
# instead of the runner streaming them through the API server. An init container copies gitea-runner from image into each job pod.
# api: through the API server (default). auto: over the pod network, through the API server for a job pod that
# cannot reach the runner. direct: over the pod network only, so a broken setup fails jobs instead of quietly
# costing API server traffic again.
#transfer:
# mode: api
# # Address and port the runner listens on and job pods reach it at, the outbound IP and a free port when empty.
# host: ""
# port: 0
# # Image with gitea-runner on its PATH, the runner pod's image when it has a single container and runs in namespace.
# image: ""
# Optional local task-admission checks. Disabled by default. When enabled, low # Optional local task-admission checks. Disabled by default. When enabled, low
# disk space or a failing script pauses new task fetching; existing jobs continue. # disk space or a failing script pauses new task fetching; existing jobs continue.
@@ -328,8 +355,8 @@ health_check:
# Minimum free space required on the filesystem holding runner workspaces. # Minimum free space required on the filesystem holding runner workspaces.
# Defaults to 1024 MiB when omitted or set to zero. # Defaults to 1024 MiB when omitted or set to zero.
#min_free_disk_space_mb: 1024 #min_free_disk_space_mb: 1024
# Optional additional executable. A non-zero exit, timeout, or startup failure # Optional additional executable, or a .bat or .cmd file on Windows. A non-zero
# marks the runner unavailable. # exit, timeout, or startup failure marks the runner unavailable.
#script: '' #script: ''
# How long a script result is cached and its maximum execution time. # How long a script result is cached and its maximum execution time.
#interval: 30s #interval: 30s
+3 -3
View File
@@ -11,11 +11,11 @@
"check": "astro check" "check": "astro check"
}, },
"dependencies": { "dependencies": {
"@astrojs/starlight": "0.42.7", "@astrojs/starlight": "0.42.8",
"@astrojs/starlight-docsearch": "0.8.0", "@astrojs/starlight-docsearch": "0.8.0",
"@gitea-docs/content-loader": "workspace:*", "@gitea-docs/content-loader": "workspace:*",
"@pagefind/default-ui": "1.5.2", "@pagefind/default-ui": "1.6.0",
"astro": "7.4.2", "astro": "7.4.5",
"sharp": "0.35.5", "sharp": "0.35.5",
"starlight-openapi": "0.27.0" "starlight-openapi": "0.27.0"
}, },
+33 -129
View File
@@ -1375,19 +1375,6 @@
}, },
"description": "StopWatchList" "description": "StopWatchList"
}, },
"StringSlice": {
"content": {
"application/json": {
"schema": {
"items": {
"type": "string"
},
"type": "array"
}
}
},
"description": "StringSlice"
},
"Tag": { "Tag": {
"content": { "content": {
"application/json": { "application/json": {
@@ -3802,6 +3789,7 @@
"x-go-name": "EnableForcePush" "x-go-name": "EnableForcePush"
}, },
"enable_force_push_allowlist": { "enable_force_push_allowlist": {
"description": "EnableForcePushAllowlist only takes effect when enable_force_push is true",
"type": "boolean", "type": "boolean",
"x-go-name": "EnableForcePushAllowlist" "x-go-name": "EnableForcePushAllowlist"
}, },
@@ -4589,6 +4577,9 @@
"x-go-name": "Path" "x-go-name": "Path"
} }
}, },
"required": [
"path"
],
"type": "object", "type": "object",
"x-go-package": "gitea.dev/modules/structs" "x-go-package": "gitea.dev/modules/structs"
}, },
@@ -4673,6 +4664,14 @@
"type": "boolean", "type": "boolean",
"x-go-name": "IsDraft" "x-go-name": "IsDraft"
}, },
"make_latest": {
"allOf": [
{
"$ref": "#/components/schemas/MakeLatest"
}
],
"description": "\"true\" sets the release as the latest, \"false\" keeps the current latest, \"legacy\" returns to the newest stable release by date. If omitted, a newly published release becomes the latest only if it is the newest by date"
},
"name": { "name": {
"description": "The display title of the release", "description": "The display title of the release",
"type": "string", "type": "string",
@@ -5931,6 +5930,14 @@
"type": "boolean", "type": "boolean",
"x-go-name": "IsDraft" "x-go-name": "IsDraft"
}, },
"make_latest": {
"allOf": [
{
"$ref": "#/components/schemas/MakeLatest"
}
],
"description": "\"true\" sets the release as the latest, \"false\" keeps the current latest, \"legacy\" returns to the newest stable release by date. If omitted, a newly published release becomes the latest only if it is the newest by date"
},
"name": { "name": {
"description": "The new display title of the release", "description": "The new display title of the release",
"type": "string", "type": "string",
@@ -7759,6 +7766,14 @@
"type": "object", "type": "object",
"x-go-package": "gitea.dev/modules/structs" "x-go-package": "gitea.dev/modules/structs"
}, },
"MakeLatest": {
"enum": [
"true",
"false",
"legacy"
],
"type": "string"
},
"MarkdownOption": { "MarkdownOption": {
"description": "MarkdownOption markdown options", "description": "MarkdownOption markdown options",
"properties": { "properties": {
@@ -11986,6 +12001,7 @@
"schema": { "schema": {
"enum": [ "enum": [
"alpine", "alpine",
"arch",
"cargo", "cargo",
"chef", "chef",
"composer", "composer",
@@ -12006,6 +12022,7 @@
"rubygems", "rubygems",
"swift", "swift",
"terraform", "terraform",
"terraform-module",
"vagrant" "vagrant"
], ],
"type": "string" "type": "string"
@@ -12034,121 +12051,6 @@
] ]
} }
}, },
"/admin/unadopted": {
"get": {
"operationId": "adminUnadoptedList",
"parameters": [
{
"description": "page number of results to return (1-based)",
"in": "query",
"name": "page",
"schema": {
"type": "integer"
}
},
{
"description": "page size of results",
"in": "query",
"name": "limit",
"schema": {
"type": "integer"
}
},
{
"description": "glob pattern of repositories to search for, in the form owner or owner/repo",
"in": "query",
"name": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/StringSlice"
},
"default": {
"$ref": "#/components/responses/error"
}
},
"summary": "List unadopted repositories",
"tags": [
"admin"
]
}
},
"/admin/unadopted/{owner}/{repo}": {
"delete": {
"operationId": "adminDeleteUnadoptedRepository",
"parameters": [
{
"description": "owner of the repo",
"in": "path",
"name": "owner",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "name of the repo",
"in": "path",
"name": "repo",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"$ref": "#/components/responses/empty"
},
"default": {
"$ref": "#/components/responses/error"
}
},
"summary": "Delete unadopted files",
"tags": [
"admin"
]
},
"post": {
"operationId": "adminAdoptRepository",
"parameters": [
{
"description": "owner of the repo",
"in": "path",
"name": "owner",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "name of the repo",
"in": "path",
"name": "repo",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"204": {
"$ref": "#/components/responses/empty"
},
"default": {
"$ref": "#/components/responses/error"
}
},
"summary": "Adopt unadopted files as a repository",
"tags": [
"admin"
]
}
},
"/admin/users": { "/admin/users": {
"get": { "get": {
"operationId": "adminSearchUsers", "operationId": "adminSearchUsers",
@@ -16270,6 +16172,7 @@
"schema": { "schema": {
"enum": [ "enum": [
"alpine", "alpine",
"arch",
"cargo", "cargo",
"chef", "chef",
"composer", "composer",
@@ -16290,6 +16193,7 @@
"rubygems", "rubygems",
"swift", "swift",
"terraform", "terraform",
"terraform-module",
"vagrant" "vagrant"
], ],
"type": "string" "type": "string"
@@ -30726,7 +30630,7 @@
"$ref": "#/components/responses/error" "$ref": "#/components/responses/error"
} }
}, },
"summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", "summary": "Gets the release set as latest, else the most recent non-prerelease, non-draft release of a repository by created_at",
"tags": [ "tags": [
"repository" "repository"
] ]
+31 -120
View File
@@ -630,6 +630,7 @@
{ {
"enum": [ "enum": [
"alpine", "alpine",
"arch",
"cargo", "cargo",
"chef", "chef",
"composer", "composer",
@@ -650,6 +651,7 @@
"rubygems", "rubygems",
"swift", "swift",
"terraform", "terraform",
"terraform-module",
"vagrant" "vagrant"
], ],
"type": "string", "type": "string",
@@ -674,116 +676,6 @@
} }
} }
}, },
"/admin/unadopted": {
"get": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "List unadopted repositories",
"operationId": "adminUnadoptedList",
"parameters": [
{
"type": "integer",
"description": "page number of results to return (1-based)",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "page size of results",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "glob pattern of repositories to search for, in the form owner or owner/repo",
"name": "query",
"in": "query"
}
],
"responses": {
"200": {
"$ref": "#/responses/StringSlice"
},
"default": {
"$ref": "#/responses/error"
}
}
}
},
"/admin/unadopted/{owner}/{repo}": {
"post": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Adopt unadopted files as a repository",
"operationId": "adminAdoptRepository",
"parameters": [
{
"type": "string",
"description": "owner of the repo",
"name": "owner",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of the repo",
"name": "repo",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
},
"default": {
"$ref": "#/responses/error"
}
}
},
"delete": {
"produces": [
"application/json"
],
"tags": [
"admin"
],
"summary": "Delete unadopted files",
"operationId": "adminDeleteUnadoptedRepository",
"parameters": [
{
"type": "string",
"description": "owner of the repo",
"name": "owner",
"in": "path",
"required": true
},
{
"type": "string",
"description": "name of the repo",
"name": "repo",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"$ref": "#/responses/empty"
},
"default": {
"$ref": "#/responses/error"
}
}
}
},
"/admin/users": { "/admin/users": {
"get": { "get": {
"produces": [ "produces": [
@@ -4728,6 +4620,7 @@
{ {
"enum": [ "enum": [
"alpine", "alpine",
"arch",
"cargo", "cargo",
"chef", "chef",
"composer", "composer",
@@ -4748,6 +4641,7 @@
"rubygems", "rubygems",
"swift", "swift",
"terraform", "terraform",
"terraform-module",
"vagrant" "vagrant"
], ],
"type": "string", "type": "string",
@@ -17877,7 +17771,7 @@
"tags": [ "tags": [
"repository" "repository"
], ],
"summary": "Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at", "summary": "Gets the release set as latest, else the most recent non-prerelease, non-draft release of a repository by created_at",
"operationId": "repoGetLatestRelease", "operationId": "repoGetLatestRelease",
"parameters": [ "parameters": [
{ {
@@ -26255,6 +26149,7 @@
"x-go-name": "EnableForcePush" "x-go-name": "EnableForcePush"
}, },
"enable_force_push_allowlist": { "enable_force_push_allowlist": {
"description": "EnableForcePushAllowlist only takes effect when enable_force_push is true",
"type": "boolean", "type": "boolean",
"x-go-name": "EnableForcePushAllowlist" "x-go-name": "EnableForcePushAllowlist"
}, },
@@ -27022,6 +26917,9 @@
"CreatePullReviewComment": { "CreatePullReviewComment": {
"description": "CreatePullReviewComment represent a review comment for creation api", "description": "CreatePullReviewComment represent a review comment for creation api",
"type": "object", "type": "object",
"required": [
"path"
],
"properties": { "properties": {
"body": { "body": {
"type": "string", "type": "string",
@@ -27141,6 +27039,17 @@
"type": "boolean", "type": "boolean",
"x-go-name": "IsDraft" "x-go-name": "IsDraft"
}, },
"make_latest": {
"description": "\"true\" sets the release as the latest, \"false\" keeps the current latest, \"legacy\" returns to the newest stable release by date. If omitted, a newly published release becomes the latest only if it is the newest by date",
"type": "string",
"enum": [
"true",
"false",
"legacy"
],
"x-go-enum-desc": "true MakeLatestTrue\nfalse MakeLatestFalse\nlegacy MakeLatestLegacy",
"x-go-name": "MakeLatest"
},
"name": { "name": {
"description": "The display title of the release", "description": "The display title of the release",
"type": "string", "type": "string",
@@ -28419,6 +28328,17 @@
"type": "boolean", "type": "boolean",
"x-go-name": "IsDraft" "x-go-name": "IsDraft"
}, },
"make_latest": {
"description": "\"true\" sets the release as the latest, \"false\" keeps the current latest, \"legacy\" returns to the newest stable release by date. If omitted, a newly published release becomes the latest only if it is the newest by date",
"type": "string",
"enum": [
"true",
"false",
"legacy"
],
"x-go-enum-desc": "true MakeLatestTrue\nfalse MakeLatestFalse\nlegacy MakeLatestLegacy",
"x-go-name": "MakeLatest"
},
"name": { "name": {
"description": "The new display title of the release", "description": "The new display title of the release",
"type": "string", "type": "string",
@@ -34636,15 +34556,6 @@
} }
} }
}, },
"StringSlice": {
"description": "StringSlice",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
"Tag": { "Tag": {
"description": "Tag", "description": "Tag",
"schema": { "schema": {
@@ -8,7 +8,7 @@ aliases:
# Database Preparation # Database Preparation
You need a database to use Gitea. Gitea supports PostgreSQL (>= 12), MySQL (>= 8.0), MariaDB (>= 10.4), SQLite (builtin), and MSSQL (>= 2012 SP4). This page will guide into preparing database. Only PostgreSQL and MySQL will be covered here since those database engines are widely-used in production. If you plan to use SQLite, you can ignore this chapter. You need a database to use Gitea. Gitea supports PostgreSQL (>= 12), MySQL (>= 8.0), MariaDB (>= 10.4), SQLite (builtin), and MSSQL (>= 2012 SP4). This page will guide into preparing database. PostgreSQL, MySQL and MSSQL are covered here. If you plan to use SQLite, you can ignore this chapter.
:::warning :::warning
Converting one database type to another is not a well-tested process and you may experience issues. It is better to choose the final database type at the type of the first installation. Be aware that SQLite does not scale; if you expect your instance to grow at a later time, you should choose another database type. Converting one database type to another is not a well-tested process and you may experience issues. It is better to choose the final database type at the type of the first installation. Be aware that SQLite does not scale; if you expect your instance to grow at a later time, you should choose another database type.
@@ -177,6 +177,28 @@ All steps below requires that the database engine of your choice is installed on
You should be prompted to enter password for the database user, and connected to the database. You should be prompted to enter password for the database user, and connected to the database.
## MSSQL
1. As an administrator, create the login, a database with case-sensitive collation, and its user. Replace the password `'gitea'` with a secure one:
```sql
CREATE LOGIN gitea WITH PASSWORD = 'gitea';
CREATE DATABASE giteadb COLLATE Latin1_General_CS_AS;
GO
USE giteadb;
CREATE USER gitea FOR LOGIN gitea;
ALTER ROLE db_owner ADD MEMBER gitea;
GO
```
Upgrades change the database schema, so the user needs `db_owner`, or `db_ddladmin`, `db_datareader` and `db_datawriter`. With the latter, also run `ALTER DATABASE giteadb SET READ_COMMITTED_SNAPSHOT ON;` as administrator.
2. On your Gitea server, test the connection to the database:
```sh
sqlcmd -S 203.0.113.3 -U gitea -d giteadb
```
## Database Connection over TLS ## Database Connection over TLS
If the communication between Gitea and your database instance is performed through a private network, or if Gitea and the database are running on the same server, this section can be omitted since the security between Gitea and the database instance is not critically exposed. If instead the database instance is on a public network, use TLS to encrypt the connection to the database, as it is possible for third-parties to intercept the traffic data. If the communication between Gitea and your database instance is performed through a private network, or if Gitea and the database are running on the same server, this section can be omitted since the security between Gitea and the database instance is not critically exposed. If instead the database instance is on a public network, use TLS to encrypt the connection to the database, as it is possible for third-parties to intercept the traffic data.
@@ -19,14 +19,7 @@ Gitea Actions is designed to be compatible with GitHub Actions, with the differe
`uses:` accepts these prefixes: `uses:` accepts these prefixes:
- `self:` references your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1` - `self:` references your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
- `builtin:` runs an action built into Gitea Runner, which needs no download and no Node in the job image, e.g. `uses: builtin:checkout` - `builtin:` runs an action built into Gitea Runner, which needs no download and does not depend on Node.js, e.g. `uses: builtin:checkout`
`builtin:checkout` accepts the `repository`, `ref`, `token`, `path` and `fetch-depth` inputs of `actions/checkout` with the same defaults, and fails on any other input.
### Workflow-relative actions
`$/` references the repository and commit of the workflow, or of the enclosing composite action, e.g. `uses: $/.gitea/actions/build`.
Unlike `./`, it needs no checkout first.
### Actions written in Go ### Actions written in Go
@@ -92,7 +85,7 @@ See [Actions job token permissions](token-permissions.md).
Actions without a host, like `uses: actions/checkout@v4`, are downloaded from `https://github.com`, or from your own instance when `[actions].DEFAULT_ACTIONS_URL` is `self`. Actions without a host, like `uses: actions/checkout@v4`, are downloaded from `https://github.com`, or from your own instance when `[actions].DEFAULT_ACTIONS_URL` is `self`.
See the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions). See the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions).
For other sources, see [Absolute action URLs](#absolute-action-urls), [Action prefixes](#action-prefixes) and [Workflow-relative actions](#workflow-relative-actions). For other sources, see [Absolute action URLs](#absolute-action-urls) and [Action prefixes](#action-prefixes).
### Context availability ### Context availability