1
0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2026-10-23 04:48:57 +03:00

977 Commits

Author SHA1 Message Date
Renovate Bot
d86d3195ac Update module github.com/vektra/mockery/v3 to v3.8.0 (#1749)
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1749
2026-09-19 02:58:39 +00:00
Mathieu Fenniak
df6b843fb9 fix(jobparser): incomplete job definition triggers pre-execution-error inside a reusable workflow (#1747)
Remove the incorrect job qualifying when namespaces are enabled.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1747
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-09-18 21:03:02 +00:00
Mathieu Fenniak
3a57ce181e fix: don't panic when ctx cancellation occurs early in job startup (#1744)
Fixes #1743.

No test automation included; the change is mechanical, trivial to review and there's no realistic risk of regression.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1744
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-09-18 16:24:10 +00:00
Erwan Leboucher
dee06d63ab fix(plugin): respect job timeout for environment lifetime (#1739)
Fixes  #1676

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1739
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-09-18 01:42:59 +00:00
Renovate Bot
b2b2651cff Update module mvdan.cc/gofumpt to v0.12.0 (#1733)
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1733
2026-09-18 01:26:04 +00:00
perfectra1n
7917d26c75 fix(cleanup): remove a step's working copy, regardless of if the job ran (#1732)
The runner only runs a step's post stage if the step *actually* ran. A composite step that was skipped because its `if:` was false, or that never ran because an earlier step failed, has no post stage. Its nested actions were checked out anyway, and nothing ever removes them. Every such job leaves a few working copies behind on the runner's disk, forever. A restart does not clean them up either.

Co-authored-by: perfectra1n <jonfuller2012@gmail.com>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1732
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-09-12 01:24:43 +00:00
Shane Creighton-Young
61e691e4de feat: efficient actions repo fetching (#1722)
In testing of 5 popular action repos, this change uses 100x less disk space for the actions repo cache and makes initial repo cloning 12x faster. It does this by only fetching 1 commit and 0-1 refs from the remote whereas current `main` code unconditionally fetches all refs including tags, branches and the full commit history associated with each ref and any other reachable objects.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1722
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-09-11 21:35:47 +00:00
Crashdummy
667c8d975b feat: Upload Job summary (#1707)
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1707
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-09-09 21:43:59 +00:00
Mathieu Fenniak
6095cb17bf fix: move environment-related description fields from capability to create RPC (#1719)
Fields that could vary between different environments in a plugin, such as the operating system identifier, are now returned in the `CreateResponse` rather than the `CapabilitiesResponse`.

Fixes #1677.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1719
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-31 15:43:44 +00:00
Mathieu Fenniak
f114bf9a3f feat(jobparser): add 'EnableNamespaces' to allow matrix reusable workflows to distinguish between internal jobs (#1716)
Adds a new `ParseOption` to the jobparser: `EnableNamespaces()`.  When enabled, reusable workflows will not use "dot-qualified" job names (`outer.inner`), but instead will have an concept of a namespace associated with each job identifier.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1716
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-30 14:54:53 +00:00
Mathieu Fenniak
86dbc5c24b feat(plugin): allow streaming logs from start operation (#1713)
Fixes #1681.  Changes the response value of the `Start` RPC to a stream, so that it can output logs.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1713): <!--number 1713 --><!--line 0 --><!--description ZmVhdChwbHVnaW4pOiBhbGxvdyBzdHJlYW1pbmcgbG9ncyBmcm9tIHN0YXJ0IG9wZXJhdGlvbg==-->feat(plugin): allow streaming logs from start operation<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1713
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-27 15:20:21 +00:00
Renovate Bot
6ba6d9f517 Update data.forgejo.org/oci/ci Docker tag to v3 (#1712)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [data.forgejo.org/oci/ci](https://code.forgejo.org/forgejo/ci-image-builder) | container | major | `2` → `3` |

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4zOS4zIiwidXBkYXRlZEluVmVyIjoiNDQuMzkuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiS2luZC9EZXBlbmRlbmN5VXBkYXRlIiwicnVuLWVuZC10by1lbmQtdGVzdHMiXX0=-->

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1712
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-08-26 02:45:41 +00:00
Mathieu Fenniak
8f6679eb6b fix(plugin): remove hard-coded 'mkdir -p' (#1710)
Fixes #1673

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1710
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2026-08-25 19:49:52 +00:00
Renovate Bot
5d7b46ed25 Update module mvdan.cc/gofumpt to v0.11.0 (#1709)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [mvdan.cc/gofumpt](https://github.com/mvdan/gofumpt) | `v0.10.0` → `v0.11.0` | ![age](https://developer.mend.io/api/mc/badges/age/go/mvdan.cc%2fgofumpt/v0.11.0?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/mvdan.cc%2fgofumpt/v0.10.0/v0.11.0?slim=true) |

---

### Release Notes

<details>
<summary>mvdan/gofumpt (mvdan.cc/gofumpt)</summary>

### [`v0.11.0`](https://github.com/mvdan/gofumpt/blob/HEAD/CHANGELOG.md#v0110---2026-07-27)

[Compare Source](https://github.com/mvdan/gofumpt/compare/v0.10.0...v0.11.0)

Like v0.10.0, this release is based on Go 1.26's gofmt, and requires Go 1.25 or later.

The multi-line function call rule introduced in v0.10.0 proved controversial,
so it is now the extra rule `balance_calls`, disabled by default.
It is also narrowed to only place the closing parenthesis on its own line
when the opening parenthesis ends a line. See [#&#8203;74](https://github.com/mvdan/gofumpt/issues/74).

Avoid crashing when compiled with tinygo for Wasm, which lacks recover support,
by detecting commented-out code without the parser's bailout panic. See [#&#8203;230](https://github.com/mvdan/gofumpt/issues/230).

Produce stable output in a single pass when a lone var declaration is adjacent
to a single-element var group, which previously required a second run. See [#&#8203;355](https://github.com/mvdan/gofumpt/issues/355).

Keep the parentheses around an expression which begins with a composite literal
of the form `T{...}`, such as `(s{}.Foo())`, as they are required when the
expression starts an `if`, `for`, or `switch` clause. See [#&#8203;356](https://github.com/mvdan/gofumpt/issues/356).

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4zOS4zIiwidXBkYXRlZEluVmVyIjoiNDQuMzkuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiS2luZC9EZXBlbmRlbmN5VXBkYXRlIiwicnVuLWVuZC10by1lbmQtdGVzdHMiXX0=-->

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1709
2026-08-25 03:04:16 +00:00
Mathieu Fenniak
fef7d81f38 fix(plugin): clarify content of ExecOutput to having one type of data at a time (#1705)
Fixes #1678.  Rather than returning a stream of chunks that may have stdout/stderr data, and may have an exit code, and may have an error message, separates them into three different messages and uses protobuf's `oneof` message type to allow one-and-only-one to be streamed at a time.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1705
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-24 19:45:04 +00:00
Mathieu Fenniak
dcd2277b33 chore: add documentation of concurrency & cancellation to plugin protocol (#1699)
Fixes #1675, clarifies requirements for automatic implementation of #1682.

Requirements documented here have been experimentally verified w/ runn-systemd-nspawn resulting in [cancellation fixes](https://codeberg.org/mfenniak/runner-systemd-nspawn/pulls/22) to that implementation.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1699): <!--number 1699 --><!--line 0 --><!--description Y2hvcmU6IGFkZCBkb2N1bWVudGF0aW9uIG9mIGNvbmN1cnJlbmN5ICYgY2FuY2VsbGF0aW9uIHRvIHBsdWdpbiBwcm90b2NvbA==-->chore: add documentation of concurrency & cancellation to plugin protocol<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1699
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-24 19:44:34 +00:00
Renovate Bot
5e1e986a5a Update module github.com/sirupsen/logrus to v1.10.1 (#1702)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) | `v1.9.4` → `v1.10.1` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fsirupsen%2flogrus/v1.10.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fsirupsen%2flogrus/v1.9.4/v1.10.1?slim=true) |

---

### Release Notes

<details>
<summary>sirupsen/logrus (github.com/sirupsen/logrus)</summary>

### [`v1.10.1`](https://github.com/sirupsen/logrus/releases/tag/v1.10.1)

[Compare Source](https://github.com/sirupsen/logrus/compare/v1.10.0...v1.10.1)

### Logrus v1.10.1

This patch release fixes two issues in field formatting and handling:

- Fix a regression introduced in v1.10.0 where `TextFormatter` could panic
  when formatting nil or panicking `error` and `fmt.Stringer` values.
- Allow function-backed values implementing `error` to be used with
  `WithError`, `WithField`, and `WithFields`.

Dependency Changes

- update github.com/stretchr/testify to v1.12.0

**Full Changelog**: <https://github.com/sirupsen/logrus/compare/v1.10.0...v1.10.1>

### [`v1.10.0`](https://github.com/sirupsen/logrus/releases/tag/v1.10.0)

[Compare Source](https://github.com/sirupsen/logrus/compare/v1.9.4...v1.10.0)

### Logrus v1.10.0

This release focuses on substantial performance improvements, concurrency correctness, and better interoperability with modern Go logging APIs.

#### 🚀 Performance

Major improvements across `TextFormatter`, entry handling, and common logger paths:

- \~17% lower geomean runtime across the benchmark suite
- \~27% higher geomean formatter throughput
- Common enabled logging paths are \~30–44% faster
- `WithError` is \~40% faster
- Chained fields are \~46% faster
- `TextFormatter` paths are up to \~40% faster
- Allocation counts are reduced by \~25–74% across measured `TextFormatter` cases, with the largest reductions in colored output

The improvements also show up in complete logger paths:

- Logger + `TextFormatter` is \~31% faster, with \~24% fewer allocations
- Logger + `JSONFormatter` is \~21% faster, with \~10% fewer allocations

`JSONFormatter` itself remains largely unchanged in runtime performance, with small allocation reductions.

#### 🔄 `log/slog` interoperability

v1.10 adds bidirectional interoperability between Logrus and Go's `log/slog`:

- A Logrus `slog` hook can forward existing Logrus entries to an `slog` logger.
- `hooks/slog.NewHandler` implements `slog.Handler`, allowing `log/slog` records to use an existing Logrus logger and its hooks, formatter, and output.
- The handler preserves levels, fields, groups, context, record timestamps, and optionally caller information.
- Caller reporting is configured per handler, without requiring Logrus's logger-wide `ReportCaller` option.
- Custom `slog` levels can be mapped to Logrus levels.
- The hook and handler can be combined, providing a practical path for incrementally migrating from Logrus to `log/slog` without requiring an all-at-once transition.

This allows applications to migrate their logging API and logging backend independently: existing Logrus call sites can start using an `slog` backend, while new `slog` code can continue using an established Logrus setup.

#### 🔒 Concurrency & Correctness

- Fix reentrant logging deadlocks, including logging from within `MarshalJSON` or formatter code.
- Fix generic `Log`, `Logf`, `Logln`, and `LogFn` methods unexpectedly panicking when called with `PanicLevel`, contrary to their documented behavior.
- Eliminate race conditions in entry and formatter paths.
- Improve locking boundaries around formatters and hooks.

#### ➕ Added

- `TextFormatter` now automatically enables colors on Windows terminals with ANSI support, matching behavior on other platforms.
- `Entry.Caller` can now be set explicitly and is preserved across derived entries. When caller reporting is enabled, Logrus only detects and populates caller information when none was provided, allowing custom caller detection and wrapper-aware logging without adding additional caller configuration APIs.
- Add minimal, composable logging interfaces for each log level, allowing consumers to depend on narrower interfaces and making logging implementations easier to substitute or adapt.
- Expand CI verification to include TinyGo and every cross-compile target reported by go tool dist list, improving coverage across alternative toolchains and platforms.

#### ⚠️ Behavioral Changes

- Minimum supported Go version is now **1.23**.
- `TextFormatter` now renders `[]byte` as raw/quoted strings instead of numeric slices.
  If you relied on the previous slice-of-ints output, convert explicitly before logging.
- `TextFormatter` now uses dim cyan for debug output and dim white for trace output in colorized TTY output.
- `Entry.HasCaller` is now deprecated in favor of checking `Entry.Caller` directly. A `//go:fix inline` directive was added so existing uses can be updated automatically.
- `MutexWrap`, which was unintentionally exposed as public API, is deprecated. It remains available as an alias for compatibility but should not be used directly.

***

v1.10 is primarily a performance, correctness, and interoperability release with no intentional breaking public API changes.

<details>
<summary>Benchmarks (sampled at 457e372460c7a80ca7c800b51ebeee5362aaa180)</summary>

```console
goos: darwin
goarch: arm64
pkg: github.com/sirupsen/logrus/benches
cpu: Apple M3 Pro
                                     │  v1.9.4.txt   │             v1.10.0.txt              │
                                     │    sec/op     │    sec/op     vs base                │
Entry_WithError                         228.8n ±  4%   137.4n ±  5%  -39.95% (p=0.000 n=10)
Entry_WithField_Chain                  1346.5n ±  2%   733.5n ±  3%  -45.53% (p=0.000 n=10)
Entry_WithFields/valid_fields_only      236.2n ±  6%   255.4n ±  1%   +8.11% (p=0.001 n=10)
Entry_WithFields/contains_func          293.1n ±  3%   285.1n ±  3%   -2.76% (p=0.043 n=10)
Entry_WithFields/contains_func_ptr      296.5n ±  3%   300.1n ±  5%        ~ (p=0.529 n=10)
Entry_WithFields/mixed_valid_invalid    339.7n ±  4%   336.7n ±  2%        ~ (p=0.315 n=10)
Entry_WithFields/larger_map             635.9n ±  4%   693.8n ±  2%   +9.11% (p=0.000 n=10)
Entry_ReportCaller_NoCaller             933.4n ±  3%   924.0n ±  2%        ~ (p=0.105 n=10)
Entry_ReportCaller_WithCaller           2.693µ ±  2%   3.050µ ±  3%  +13.28% (p=0.000 n=10)
Entry_ReportCaller_NoCaller_Depth4      914.3n ±  2%   905.5n ±  3%        ~ (p=0.481 n=10)
Entry_ReportCaller_WithCaller_Depth4    2.736µ ±  8%   3.048µ ±  5%  +11.36% (p=0.000 n=10)
ZeroTextFormatter                       457.6n ±  1%   369.3n ±  2%  -19.31% (p=0.000 n=10)
OneStringTextFormatter                  637.0n ±  1%   549.4n ±  2%  -13.75% (p=0.000 n=10)
OneNumericTextFormatter                 682.7n ±  1%   550.2n ±  1%  -19.42% (p=0.000 n=10)
OneBoolTextFormatter                    669.7n ±  1%   550.0n ±  1%  -17.87% (p=0.000 n=10)
NumericTextFormatter                    1.685µ ±  3%   1.261µ ±  2%  -25.17% (p=0.000 n=10)
BoolTextFormatter                       1.450µ ±  1%   1.082µ ±  3%  -25.39% (p=0.000 n=10)
StringerTextFormatter                   2.066µ ±  1%   1.323µ ±  1%  -35.95% (p=0.000 n=10)
ErrorTextFormatter                      924.7n ±  5%   686.7n ±  1%  -25.74% (p=0.000 n=10)
SmallTextFormatter                      944.4n ±  1%   862.6n ±  1%   -8.66% (p=0.000 n=10)
LargeTextFormatter                      5.527µ ±  5%   4.750µ ±  2%  -14.07% (p=0.000 n=10)
SmallColoredTextFormatter              1337.0n ±  3%   838.6n ±  1%  -37.28% (p=0.000 n=10)
LargeColoredTextFormatter               7.955µ ±  5%   4.749µ ±  3%  -40.30% (p=0.000 n=10)
SmallJSONFormatter                      1.627µ ±  1%   1.637µ ±  6%        ~ (p=0.670 n=10)
LargeJSONFormatter                      8.335µ ±  3%   8.172µ ±  1%   -1.96% (p=0.000 n=10)
DummyLogger                             1.843µ ±  3%   1.551µ ±  2%  -15.82% (p=0.000 n=10)
DummyLoggerNoLock                       1.840µ ±  3%   1.558µ ±  3%  -15.30% (p=0.000 n=10)
LoggerLog/disabled_level                1.248n ± 11%   1.192n ± 11%   -4.49% (p=0.011 n=10)
LoggerLog/enabled_log                   223.9n ±  3%   157.7n ±  5%  -29.57% (p=0.000 n=10)
LoggerLog/enabled_logln                 284.2n ±  1%   158.9n ±  2%  -44.09% (p=0.000 n=10)
LoggerJSONFormatter                     2.177µ ±  1%   1.712µ ±  1%  -21.34% (p=0.000 n=10)
LoggerTextFormatter                     1.860µ ±  5%   1.282µ ±  3%  -31.05% (p=0.000 n=10)
geomean                                 843.9n         698.9n        -17.18%

                                     │   v1.9.4.txt   │              v1.10.0.txt               │
                                     │      B/op      │     B/op      vs base                  │
Entry_WithError                          448.0 ± 0%       448.0 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithField_Chain                  2.188Ki ± 0%     2.188Ki ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/valid_fields_only       448.0 ± 0%       448.0 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/contains_func           488.0 ± 0%       488.0 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/contains_func_ptr       488.0 ± 0%       488.0 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/mixed_valid_invalid     488.0 ± 0%       488.0 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/larger_map            1.320Ki ± 0%     1.320Ki ± 0%        ~ (p=1.000 n=10) ¹
Entry_ReportCaller_NoCaller              821.0 ± 0%       800.0 ± 0%   -2.56% (p=0.000 n=10)
Entry_ReportCaller_WithCaller          1.614Ki ± 0%     1.581Ki ± 0%   -2.06% (p=0.000 n=10)
Entry_ReportCaller_NoCaller_Depth4       821.0 ± 0%       800.0 ± 0%   -2.56% (p=0.000 n=10)
Entry_ReportCaller_WithCaller_Depth4   1.614Ki ± 0%     1.581Ki ± 0%   -2.06% (p=0.000 n=10)
ZeroTextFormatter                        272.0 ± 0%       232.0 ± 0%  -14.71% (p=0.000 n=10)
OneStringTextFormatter                   304.0 ± 0%       264.0 ± 0%  -13.16% (p=0.000 n=10)
OneNumericTextFormatter                  308.0 ± 0%       264.0 ± 0%  -14.29% (p=0.000 n=10)
OneBoolTextFormatter                     308.0 ± 0%       264.0 ± 0%  -14.29% (p=0.000 n=10)
NumericTextFormatter                     920.0 ± 0%       808.0 ± 0%  -12.17% (p=0.000 n=10)
BoolTextFormatter                        626.0 ± 0%       552.0 ± 0%  -11.82% (p=0.000 n=10)
StringerTextFormatter                    968.0 ± 0%       808.0 ± 0%  -16.53% (p=0.000 n=10)
ErrorTextFormatter                       472.0 ± 0%       424.0 ± 0%  -10.17% (p=0.000 n=10)
SmallTextFormatter                       528.0 ± 0%       488.0 ± 0%   -7.58% (p=0.000 n=10)
LargeTextFormatter                     3.773Ki ± 0%     3.156Ki ± 0%  -16.36% (p=0.000 n=10)
SmallColoredTextFormatter                600.0 ± 0%       392.0 ± 0%  -34.67% (p=0.000 n=10)
LargeColoredTextFormatter              4.406Ki ± 0%     2.859Ki ± 0%  -35.11% (p=0.000 n=10)
SmallJSONFormatter                     1.078Ki ± 0%     1.070Ki ± 0%   -0.72% (p=0.000 n=10)
LargeJSONFormatter                     5.086Ki ± 0%     5.078Ki ± 0%   -0.15% (p=0.000 n=10)
DummyLogger                              748.0 ± 0%       704.0 ± 0%   -5.88% (p=0.000 n=10)
DummyLoggerNoLock                        748.0 ± 0%       704.0 ± 0%   -5.88% (p=0.000 n=10)
LoggerLog/disabled_level                 0.000 ± 0%       0.000 ± 0%        ~ (p=1.000 n=10) ¹
LoggerLog/enabled_log                    212.0 ± 0%       208.0 ± 0%   -1.89% (p=0.000 n=10)
LoggerLog/enabled_logln                  240.0 ± 0%       208.0 ± 0%  -13.33% (p=0.000 n=10)
LoggerJSONFormatter                    2.156Ki ± 0%     2.125Ki ± 0%   -1.45% (p=0.000 n=10)
LoggerTextFormatter                    1.625Ki ± 0%     1.547Ki ± 0%   -4.81% (p=0.000 n=10)
geomean                                             ²                  -8.14%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                                     │  v1.9.4.txt   │             v1.10.0.txt              │
                                     │   allocs/op   │ allocs/op   vs base                  │
Entry_WithError                         3.000 ± 0%     3.000 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithField_Chain                   15.00 ± 0%     15.00 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/valid_fields_only      3.000 ± 0%     3.000 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/contains_func          5.000 ± 0%     5.000 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/contains_func_ptr      5.000 ± 0%     5.000 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/mixed_valid_invalid    5.000 ± 0%     5.000 ± 0%        ~ (p=1.000 n=10) ¹
Entry_WithFields/larger_map             5.000 ± 0%     5.000 ± 0%        ~ (p=1.000 n=10) ¹
Entry_ReportCaller_NoCaller             18.00 ± 0%     15.00 ± 0%  -16.67% (p=0.000 n=10)
Entry_ReportCaller_WithCaller           29.00 ± 0%     26.00 ± 0%  -10.34% (p=0.000 n=10)
Entry_ReportCaller_NoCaller_Depth4      18.00 ± 0%     15.00 ± 0%  -16.67% (p=0.000 n=10)
Entry_ReportCaller_WithCaller_Depth4    29.00 ± 0%     26.00 ± 0%  -10.34% (p=0.000 n=10)
ZeroTextFormatter                      10.000 ± 0%     7.000 ± 0%  -30.00% (p=0.000 n=10)
OneStringTextFormatter                 11.000 ± 0%     8.000 ± 0%  -27.27% (p=0.000 n=10)
OneNumericTextFormatter                12.000 ± 0%     8.000 ± 0%  -33.33% (p=0.000 n=10)
OneBoolTextFormatter                   12.000 ± 0%     8.000 ± 0%  -33.33% (p=0.000 n=10)
NumericTextFormatter                    19.00 ± 0%     10.00 ± 0%  -47.37% (p=0.000 n=10)
BoolTextFormatter                      18.000 ± 0%     9.000 ± 0%  -50.00% (p=0.000 n=10)
StringerTextFormatter                   22.00 ± 0%     10.00 ± 0%  -54.55% (p=0.000 n=10)
ErrorTextFormatter                     14.000 ± 0%     9.000 ± 0%  -35.71% (p=0.000 n=10)
SmallTextFormatter                     12.000 ± 0%     9.000 ± 0%  -25.00% (p=0.000 n=10)
LargeTextFormatter                      19.00 ± 0%     14.00 ± 0%  -26.32% (p=0.000 n=10)
SmallColoredTextFormatter              15.000 ± 0%     7.000 ± 0%  -53.33% (p=0.000 n=10)
LargeColoredTextFormatter               46.00 ± 0%     12.00 ± 0%  -73.91% (p=0.000 n=10)
SmallJSONFormatter                      25.00 ± 0%     23.00 ± 0%   -8.00% (p=0.000 n=10)
LargeJSONFormatter                      75.00 ± 0%     73.00 ± 0%   -2.67% (p=0.000 n=10)
DummyLogger                            13.000 ± 0%     9.000 ± 0%  -30.77% (p=0.000 n=10)
DummyLoggerNoLock                      13.000 ± 0%     9.000 ± 0%  -30.77% (p=0.000 n=10)
LoggerLog/disabled_level                0.000 ± 0%     0.000 ± 0%        ~ (p=1.000 n=10) ¹
LoggerLog/enabled_log                   4.000 ± 0%     3.000 ± 0%  -25.00% (p=0.000 n=10)
LoggerLog/enabled_logln                 6.000 ± 0%     3.000 ± 0%  -50.00% (p=0.000 n=10)
LoggerJSONFormatter                     30.00 ± 0%     27.00 ± 0%  -10.00% (p=0.000 n=10)
LoggerTextFormatter                     21.00 ± 0%     16.00 ± 0%  -23.81% (p=0.000 n=10)
geomean                                            ²               -25.77%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                          │  v1.9.4.txt  │              v1.10.0.txt              │
                          │     B/s      │      B/s       vs base                │
ZeroTextFormatter           106.3Mi ± 1%    131.7Mi ± 2%  +23.90% (p=0.000 n=10)
OneStringTextFormatter      88.34Mi ± 1%   102.42Mi ± 2%  +15.95% (p=0.000 n=10)
OneNumericTextFormatter     78.23Mi ± 1%    97.08Mi ± 1%  +24.09% (p=0.000 n=10)
OneBoolTextFormatter        82.59Mi ± 1%   100.57Mi ± 1%  +21.77% (p=0.000 n=10)
NumericTextFormatter        74.74Mi ± 3%    99.85Mi ± 2%  +33.60% (p=0.000 n=10)
BoolTextFormatter           65.15Mi ± 1%    87.32Mi ± 3%  +34.04% (p=0.000 n=10)
StringerTextFormatter       64.64Mi ± 1%   100.90Mi ± 1%  +56.10% (p=0.000 n=10)
ErrorTextFormatter          69.10Mi ± 5%    93.05Mi ± 1%  +34.66% (p=0.000 n=10)
SmallTextFormatter          86.85Mi ± 1%    95.08Mi ± 1%   +9.48% (p=0.000 n=10)
LargeTextFormatter          49.35Mi ± 5%    57.43Mi ± 2%  +16.38% (p=0.000 n=10)
SmallColoredTextFormatter   102.7Mi ± 3%    163.8Mi ± 1%  +59.42% (p=0.000 n=10)
LargeColoredTextFormatter   67.14Mi ± 5%   112.45Mi ± 3%  +67.48% (p=0.000 n=10)
SmallJSONFormatter          66.84Mi ± 1%    66.44Mi ± 6%        ~ (p=0.684 n=10)
LargeJSONFormatter          46.91Mi ± 3%    47.85Mi ± 1%   +2.00% (p=0.000 n=10)
geomean                     73.01Mi         92.67Mi       +26.93%
```

</details>

**Full Changelog**: <https://github.com/sirupsen/logrus/compare/v1.9.4...v1.10.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiI0NC4zMS4wIiwidXBkYXRlZEluVmVyIjoiNDQuMzEuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiS2luZC9EZXBlbmRlbmN5VXBkYXRlIiwicnVuLWVuZC10by1lbmQtdGVzdHMiXX0=-->

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1702
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-08-24 00:27:32 +00:00
Mathieu Fenniak
cc052b63e3 fix: remove duplicate working directory & environment from plugin protocol (#1686)
Fixes #1679.

Rather than specifying `env` and `working_dir` in both the `CreateRequest` and `ExecRequest`, the runner will provide the complete information in the `ExecRequest`.  This simplifies a plugin author's job by providing just have one source of this information when executing commands.

Separate from the mock testing performed here, I've integration tested this with workflow-level, job-level, and step-level environment variables, and confirmed that they are all set and override each other as expected.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1686): <!--number 1686 --><!--line 0 --><!--description Zml4OiByZW1vdmUgZHVwbGljYXRlIHdvcmtpbmcgZGlyZWN0b3J5ICYgZW52aXJvbm1lbnQgZnJvbSBwbHVnaW4gcHJvdG9jb2w=-->fix: remove duplicate working directory & environment from plugin protocol<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1686
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-22 16:11:51 +00:00
Mathieu Fenniak
5603f80990 test: fix TestRunner_RunEvent not checking error messages on error cases (#1693)
A coding error seems to have assumed that `assert.Error(t, err, j.errorMessage)` would check that the error message is contained in err, but this just asserts that there is an error.  Fix that assertion so that tests with a `errorMessage` field will fail if they don't get an error, and fail if they get an error that doesn't contain the target error message.

Discovered while making a mistake in implementing a test in #1691.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1693): <!--number 1693 --><!--line 0 --><!--description dGVzdDogZml4IGBUZXN0UnVubmVyX1J1bkV2ZW50YCBub3QgY2hlY2tpbmcgZXJyb3IgbWVzc2FnZXMgb24gZXJyb3IgY2FzZXM=-->test: fix `TestRunner_RunEvent` not checking error messages on error cases<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1693
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-22 13:31:36 +00:00
Mathieu Fenniak
6b56febc6f fix: prevent runner's stdout isatty affecting docker create, exec, attach commands (#1691)
When running docker-based jobs, runner would determine whether to attach a tty to the entrypoint, and each `exec`'d command, by whether the runner's own stdout was a tty.  This behaviour is removed in this PR.

This behaviour doesn't make much sense.  When running as a daemon, job information is not logged to stdout and so the state of stdout is irrelevant.  When running in `forgejo-runner exec`, the behaviour doesn't take into account the usage of the `-json` parameter (which logs in JSON), and the fact that the log output is embedded with log lines that describe each job that is being executed -- for both reasons, the job doesn't really have a terminal to control.  It also isn't great for `daemon` and `exec` to behave differently inside the jobs.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1691): <!--number 1691 --><!--line 0 --><!--description Zml4OiBwcmV2ZW50IHJ1bm5lcidzIHN0ZG91dCBpc2F0dHkgYWZmZWN0aW5nIGRvY2tlciBjcmVhdGUsIGV4ZWMsIGF0dGFjaCBjb21tYW5kcw==-->fix: prevent runner's stdout isatty affecting docker create, exec, attach commands<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1691
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-21 21:23:01 +00:00
Mathieu Fenniak
d4db4179a9 fix: don't run host-based executor & LXC executor subcommands in a TTY (#1692)
All LXC and host-based commands were being unconditionally run with a pty attached.  As Forgejo Action's log viewer is not a terminal emulator, and it is not capable of supporting most terminal control output, this PR removes that implementation choice.  This brings consistency with docker-based execution, where the container may optionally be connected to a tty, but the command execution is not (when using `daemon` mode).

The accurate state to describe Forgejo Runner's output is that it is not a terminal, but that it does support a subset of ANSI codes such as colour selection (FG & BG), bold, faint, italic, underline, and hyperlinks.  Unfortunately there is no way to communicate that subset to a program in a standardized way -- setting a tty is sometimes used as a signal for such, but it's a near-miss in communicating that intent.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1692): <!--number 1692 --><!--line 0 --><!--description Zml4OiBkb24ndCBydW4gaG9zdC1iYXNlZCBleGVjdXRvciAmIExYQyBleGVjdXRvciBzdWJjb21tYW5kcyBpbiBhIFRUWQ==-->fix: don't run host-based executor & LXC executor subcommands in a TTY<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1692
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-21 20:23:55 +00:00
Erwan Leboucher
55b6724479 feat(plugin): add experimental gRPC v1alpha plugin backend support (#1500)
Implements an experimental gRPC protocol for plugable backend systems, per https://code.forgejo.org/forgejo/forgejo-actions-feature-requests/issues/107#issuecomment-85284.

---

(Notes from @mfenniak, Forgejo merger):

Implements an experimental gRPC protocol for plugable backend systems, per https://code.forgejo.org/forgejo/forgejo-actions-feature-requests/issues/107#issuecomment-85284.  This allows future development of new job container execution models, such as Firecracker VMs, qEMU VMs, systemd-nspawn containers, Kubernetes pods, etc.

As an v1alpha protocol, the protocol is subject to change with no stability guarantees at the moment.

As an experimental feature, the Forgejo team is not yet willing to fully commit that this feature will be a permanent addition.  We believe it is a good direction, and we believe we can continue to iterate it to a fully supportable and capable feature based upon feedback from ourselves and other users.  But as that feedback is collected and incorporated, we leave open the possibility that we may gain new knowledge and be required to change direction.

---

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1500): <!--number 1500 --><!--line 0 --><!--description ZmVhdChwbHVnaW4pOiBhZGQgZXhwZXJpbWVudGFsIGdSUEMgdjFhbHBoYSBwbHVnaW4gYmFja2VuZCBzdXBwb3J0-->feat(plugin): add experimental gRPC v1alpha plugin backend support<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1500
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-08-16 00:37:20 +00:00
Mathieu Fenniak
1a633ad513 chore: prepare for runner v13 release (#1645)
Global search and replace of `runner/v12` for `runner/v13`.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1645): <!--number 1645 --><!--line 0 --><!--description Y2hvcmU6IHByZXBhcmUgZm9yIHJ1bm5lciB2MTMgcmVsZWFzZQ==-->chore: prepare for runner v13 release<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1645
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-08-03 15:55:53 +00:00
Andreas Ahlenstorf
f8d2a80e58 fix: interpolate uses key of Docker actions (#1656)
The documentation [claims](https://forgejo.org/docs/latest/user/actions/reference/#availability) that context variables can be referenced in `jobs.<job-id>.steps[*].uses`. That is true for normal actions, but not for Docker-based actions. For example, the first step in the workflow below succeeds while the second fails because Forgejo Runner does not interpolate the `uses` key.

```yaml
on:
  workflow_dispatch:
    inputs:
      checkout-tag:
        default: 9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
        type: string
      debian-tag:
        default: stable-slim@sha256:34363c20bd149e41365fc77b086da067ed13ab2dff4cd0612788e12e6d52c44c
        type: string

jobs:
  run-tag:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@${{ inputs.checkout-tag }}

      - uses: docker://docker.io/debian:${{ inputs.debian-tag }}
        with:
          args: ls -al
```

Resolves https://codeberg.org/forgejo/forgejo/issues/13189.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1656): <!--number 1656 --><!--line 0 --><!--description Zml4OiBpbnRlcnBvbGF0ZSB1c2VzIGtleSBvZiBEb2NrZXIgYWN0aW9ucw==-->fix: interpolate uses key of Docker actions<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1656
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-27 19:33:29 +00:00
Andreas Ahlenstorf
b720a8fe3f fix: do not log error if runs-on is absent (#1655)
There are multiple situations where the absence of `runs-on` is correct, for example, if a job references a reusable workflow with `uses`. The logged error only confuses users in those situations. Besides, it is the responsibility of workflow validation to ensure that `runs-on` is present. Therefore, no attempt is made to make the message more accurate.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1655): <!--number 1655 --><!--line 0 --><!--description Zml4OiBkbyBub3QgbG9nIGVycm9yIGlmIHJ1bnMtb24gaXMgYWJzZW50-->fix: do not log error if runs-on is absent<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1655
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-27 19:24:59 +00:00
Andreas Ahlenstorf
6a600499bf fix: turn invalid matrices into a hard error (#1654)
Invalid matrices, including invalid exclude keys, would only be logged, but the job would continue and potentially "succeed".

This change should not impact users of Forgejo, because most problems are caught by workflow validation before the workflows are dispatched to Forgejo Runner.

Follow-up to https://code.forgejo.org/forgejo/runner/pulls/1646.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1654): <!--number 1654 --><!--line 0 --><!--description Zml4OiB0dXJuIGludmFsaWQgbWF0cmljZXMgaW50byBhIGhhcmQgZXJyb3I=-->fix: turn invalid matrices into a hard error<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1654
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-27 19:24:07 +00:00
Andreas Ahlenstorf
e077c395bc fix: fail jobs, steps if expression interpolation fails (#1646)
Forgejo Runner supports expressions in workflows, for example, `format('Hello {0} {1} {2}', 'Mona', 'the', 'Octocat')`. If Forgejo Runner encounters an invalid expression, it logs an error, but otherwise progresses as if nothing had happened. That can cause unpredictable or even unwanted results. This change turns invalid expressions into a hard error that stops normal execution and fails the respective step.

Resolves https://code.forgejo.org/forgejo/runner/issues/1596.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1646
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-25 20:02:24 +00:00
Mathieu Fenniak
620f116a5f fix: EvaluateIf() loses ${{ inputs.x }} on reusable workflow expansion (#1643)
Fixes https://codeberg.org/forgejo/forgejo/issues/13558.

When expanding a workflow, a new set of inputs is created in a new parse context for evaluation.  But that parse context was being lost, rather than being preserved, causing future access to `EvaluateIf` to have no access to the expanded workflow's inputs.

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1643
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-07-23 14:10:48 +00:00
Mathieu Fenniak
b5a3bf90d1 fix: prevent commit impersonation via refs/replace/* during action checkout (#1635)
Prevent the usage of `git replace` to create a ref that shadows another commit, similar to previous fixes for tags and branches.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1635): <!--number 1635 --><!--line 0 --><!--description Zml4OiBwcmV2ZW50IGNvbW1pdCBpbXBlcnNvbmF0aW9uIHZpYSBgcmVmcy9yZXBsYWNlLypgIGR1cmluZyBhY3Rpb24gY2hlY2tvdXQ=-->fix: prevent commit impersonation via `refs/replace/*` during action checkout<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1635
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-07-19 20:46:56 +00:00
Andreas Ahlenstorf
9ffa185850 chore: upgrade github.com/docker/cli to v29 (#1547)
Update the Docker client libraries from v28 to v29 because v28 is no longer maintained. The minimum requirement for Docker has been raised to Docker 25.0.

Users of Debian 13 (Trixie) or 12 (Bookworm) that use IPv6 [are affected by a bug](https://github.com/moby/moby/pull/49520) in the Docker version shipped by Debian that results in error messages like:

```
2026/07/01 14:58:59 Could not get list of networks: ParseAddr("fd05:d0ca:2::1/112"): unexpected character, want colon (at "/112")
```

Affected Debian users should either not upgrade Forgejo Runner or switch to the Docker package provided by Docker until the problem is either resolved by the Docker or Debian developers.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1547): <!--number 1547 --><!--line 0 --><!--description Y2hvcmU6IHVwZ3JhZGUgZ2l0aHViLmNvbS9kb2NrZXIvY2xpIHRvIHYyOQ==-->chore: upgrade github.com/docker/cli to v29<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1547
2026-07-19 14:58:12 +00:00
Mathieu Fenniak
0cc27a9984 fix: nil dereference when EvaluateIf is called w/ cancelled() expr (#1633)
Fixes https://codeberg.org/forgejo/forgejo/issues/13503.

The existing implementation of `cancelled()` assumes that it is being invoked in a job execution context, not by the jobparser.  Because Forgejo doesn't attempt to check the `if` conditions of jobs during a workflow cancel, I didn't implement this case -- but overlooked that including the function in an expression was still possible if meaningless, and therefore didn't test it.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1633): <!--number 1633 --><!--line 0 --><!--description Zml4OiBuaWwgZGVyZWZlcmVuY2Ugd2hlbiBFdmFsdWF0ZUlmIGlzIGNhbGxlZCB3LyBjYW5jZWxsZWQoKSBleHBy-->fix: nil dereference when EvaluateIf is called w/ cancelled() expr<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1633
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-07-18 13:08:19 +00:00
Andreas Ahlenstorf
9009e09c2d chore: remove workflow command set-output (#1631)
The workflow command `set-output` allows defining output variables. Unfortunately, it is difficult to use securely. Therefore, it is removed from Forgejo Runner. If workflows still use `set-output`, a warning will be printed. Workflows that want to set output variables can do so by writing to `$FORGEJO_OUTPUT`.

Instead of:

```yaml
- run: |
    echo "::set-output name=MY_VARIABLE::value"
```

Use:

```yaml
- run: |
    echo "MY_VARIABLE=value" >> "$FORGEJO_OUTPUT"
```

See https://code.forgejo.org/forgejo/runner/issues/1455.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1631): <!--number 1631 --><!--line 0 --><!--description Y2hvcmU6IHJlbW92ZSB3b3JrZmxvdyBjb21tYW5kIHNldC1vdXRwdXQ=-->chore: remove workflow command set-output<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1631
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-18 02:01:31 +00:00
Andreas Ahlenstorf
1738c981d3 chore: update hashfiles (#1629)
Taken directly without modifications from 7df164d2c7/src/Misc/layoutbin/hashFiles/index.js. It no longer uses workflow commands if it can be avoided.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1629): <!--number 1629 --><!--line 0 --><!--description Y2hvcmU6IHVwZGF0ZSBoYXNoZmlsZXM=-->chore: update hashfiles<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1629
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-17 02:27:15 +00:00
Andreas Ahlenstorf
3efb66d798 chore: remove workflow command set-env (#1627)
The workflow command `set-env` allows injecting additional variables into the environment. Unfortunately, it is difficult to use securely. Therefore, it is removed from Forgejo Runner. If workflows still use `set-env`, a warning will be printed. Contrary to GitHub Actions, it is not possible to restore it by setting the environment variable `ACTIONS_ALLOW_UNSECURE_COMMANDS=true` because better alternatives exist. Workflows that need to amend the environment can write to `$FORGEJO_ENV`.

Instead of:

```yaml
- run: |
    echo "::set-env name=MY_VARIABLE::value"
```

Use:

```yaml
- run: |
    echo "MY_VARIABLE=value" >> "$FORGEJO_ENV"
```

See https://code.forgejo.org/forgejo/runner/issues/1455.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1627): <!--number 1627 --><!--line 0 --><!--description Y2hvcmU6IHJlbW92ZSB3b3JrZmxvdyBjb21tYW5kIHNldC1lbnY=-->chore: remove workflow command set-env<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1627
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-17 02:12:07 +00:00
Andreas Ahlenstorf
befeb7f2ef chore: remove workflow command add-path (#1616)
The workflow command `add-path` allows amending `PATH` that is injected into successive steps. Unfortunately, it is difficult to use securely. Therefore, it is removed from Forgejo Runner. If workflows still use `add-path`, a warning will be printed. Contrary to GitHub Actions, it is not possible to restore it again by setting the environment variable `ACTIONS_ALLOW_UNSECURE_COMMANDS=true` because better alternatives exist. Workflows that need to amend `PATH` of successive steps should write to `$FORGEJO_PATH`:

```yaml
on:
  push:
jobs:
  test:
    runs-on: debian
    steps:
      - run: |
          echo "/add-to-path" > "$FORGEJO_PATH"
      - run: |
          echo "$PATH"
```

See https://code.forgejo.org/forgejo/runner/issues/1455 and [GitHub Actions: Deprecating set-env and add-path commands](https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/#patching-your-actions-and-workflows).

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1616): <!--number 1616 --><!--line 0 --><!--description Y2hvcmU6IHJlbW92ZSB3b3JrZmxvdyBjb21tYW5kIGFkZC1wYXRo-->chore: remove workflow command add-path<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1616
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-15 01:09:19 +00:00
Mathieu Fenniak
2736a4eff8 fix: run git subprocesses in a process group (#1623)
git subprocesses which the runner spawns were not being placed into a process group, and were not being terminated in a process group, in the event that a job's context was cancelled.  This could allow git subprocesses to be left as zombies when git was cancelled by the runner.

This PR fixes the git subprocess management to use the same cross-platform system developed for the host-based executor.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1623): <!--number 1623 --><!--line 0 --><!--description Zml4OiBydW4gZ2l0IHN1YnByb2Nlc3NlcyBpbiBhIHByb2Nlc3MgZ3JvdXA=-->fix: run git subprocesses in a process group<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1623
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
2026-07-14 16:12:44 +00:00
Andreas Ahlenstorf
3f73a86e07 fix: potential nil dereference in (*SingleWorkflow).HasPermissions() (#1620)
Resolves https://code.forgejo.org/forgejo/runner/issues/1579.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1620): <!--number 1620 --><!--line 0 --><!--description Zml4OiBwb3RlbnRpYWwgbmlsIGRlcmVmZXJlbmNlIGluICgqU2luZ2xlV29ya2Zsb3cpLkhhc1Blcm1pc3Npb25zKCk=-->fix: potential nil dereference in (*SingleWorkflow).HasPermissions()<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1620
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-12 01:23:19 +00:00
Andreas Ahlenstorf
e098824810 test: fix tests that accidentally require Docker, skip rest (#1619)
<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1619): <!--number 1619 --><!--line 0 --><!--description dGVzdDogZml4IHRlc3RzIHRoYXQgYWNjaWRlbnRhbGx5IHJlcXVpcmUgRG9ja2VyLCBza2lwIHJlc3Q=-->test: fix tests that accidentally require Docker, skip rest<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1619
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-12 01:02:06 +00:00
Andreas Ahlenstorf
16b8502407 chore: remove Gitea compatibility (#1611)
Since the introduction of [workflow validation](65ae238f17), Forgejo Runner would refuse running workflows that reference the `gitea` context. This change removes the remains of the Gitea support: the `gitea` context and some supporting variables like `GITEA_TOKEN`.

See https://codeberg.org/forgejo/discussions/issues/439 and https://code.forgejo.org/forgejo/runner/issues/1319.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1611): <!--number 1611 --><!--line 0 --><!--description Y2hvcmU6IHJlbW92ZSBHaXRlYSBjb21wYXRpYmlsaXR5-->chore: remove Gitea compatibility<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1611
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-11 00:53:32 +00:00
Andreas Ahlenstorf
04be7a7956 fix: bind workspace into actions container in host mode (#1606)
When Forgejo Runner is in host mode and a Docker-based action is invoked, the action cannot interact with the workspace because it's empty. Also, the container's `$PATH` is replaced with the host's `$PATH`. That can lead to the action being unable to invoke basic tools.

This is fixed by bind-mounting the workspace and the `act` directory from the host into the step container. Also, `$PATH` is not longer replaced.

Resolves https://code.forgejo.org/forgejo/runner/issues/1587.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1606): <!--number 1606 --><!--line 0 --><!--description Zml4OiBiaW5kIHdvcmtzcGFjZSBpbnRvIGFjdGlvbnMgY29udGFpbmVyIGluIGhvc3QgbW9kZQ==-->fix: bind workspace into actions container in host mode<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1606
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-10 16:11:50 +00:00
Renovate Bot
3874a60871 Update module github.com/golangci/golangci-lint/v2/cmd/golangci-lint to v2.12.2 (#1613)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [github.com/golangci/golangci-lint/v2/cmd/golangci-lint](https://github.com/golangci/golangci-lint) | `v2.11.4` → `v2.12.2` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgolangci%2fgolangci-lint%2fv2%2fcmd%2fgolangci-lint/v2.12.2?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgolangci%2fgolangci-lint%2fv2%2fcmd%2fgolangci-lint/v2.11.4/v2.12.2?slim=true) |

---

### Release Notes

<details>
<summary>golangci/golangci-lint (github.com/golangci/golangci-lint/v2/cmd/golangci-lint)</summary>

### [`v2.12.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2122)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.12.1...v2.12.2)

*Released on 2026-05-06*

1. Linters bug fixes
   - `gomodguard_v2`: fix blocked configuration
   - `gomodguard_v2`: from 2.1.0 to 2.1.3
   - `iface`: from 1.4.1 to 1.4.2

### [`v2.12.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2121)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.12.0...v2.12.1)

*Released on 2026-05-01*

1. Linters bug fixes
   - `gomodguard_v2`: fix panic with migration suggestion
2. Misc.
   - fix `install.sh` script (if you are still using an URL based on the branch `master`, please update to use `https://golangci-lint.run/install.sh`)

### [`v2.12.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v2120)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v2.11.4...v2.12.0)

*Released on 2026-05-01*

1. New linters
   - Add `clickhouselint` linter <https://github.com/ClickHouse/clickhouse-go-linter>
2. Linters new features or changes
   - `dupl`: from [`f665c8d`](https://github.com/golangci/golangci-lint/commit/f665c8d69b32) to [`c99c5cf`](https://github.com/golangci/golangci-lint/commit/c99c5cf5c202) (extended detection)
   - `funcorder`: from 0.5.0 to 0.6.0 (new option: `function`)
   - `goconst`: add an option to ignore strings from tests
   - `goconst`: from 1.8.2 to 1.10.0 (extended detection)
   - `gomodguard_v2`: from 1.4.1 to 2.1.0 (major version with new configuration)
   - `gosec`: from [`619ce21`](https://github.com/golangci/golangci-lint/commit/619ce2117e08) to 2.26.1 (new checks: `G124`, `G708`, `G709`, `G710`)
   - `govet`: add `inline` analyzer
   - `makezero`: from 2.1.0 to 2.2.1 (support slice type aliases)
   - `paralleltest`: expose `checkcleanup` option
   - `sloglint`: from 0.11.1 to 0.12.0 (new options: `allowed-keys`, `custom-funcs`)
   - `wsl_v5`: from 5.6.0 to 5.8.0 (new option: `cuddle-max-statements`; new checks: `after-decl`, `after-defer`, `after-expr`, `after-go`, `cuddle-group`)
3. Linters bug fixes
   - `forbidigo`: from 2.3.0 to 2.3.1
   - `godot`: from 1.5.4 to 1.5.6
   - `govet-modernize`: from 0.43.0 to 0.44.0
   - `ireturn`: from 0.4.0 to 0.4.1
   - `rowserrcheck`: from 1.1.1 to [`c5f79b8`](https://github.com/golangci/golangci-lint/commit/c5f79b8)
4. Misc.
   - Decrease cache entropy
   - Embed the JSON schema in the binary
   - Filter env vars when cloning the repository with the `custom` command

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

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

---

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

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1613
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-10 02:40:51 +00:00
Andreas Ahlenstorf
5a7dd2dddf chore: remove ability to use secrets for registry authentication (#1610)
When the secrets `DOCKER_USERNAME` and `DOCKER_PASSWORD` were defined in Forgejo, Forgejo Runner would attempt to use them to authenticate to _any_ container registry that required authentication when pulling images. The functionality can be replaced by specifying credentials explicitly using [`jobs.<job_id>.container.credentials`](https://forgejo.org/docs/latest/user/actions/reference/#jobsjob_idcontainercredentials).

See https://code.forgejo.org/forgejo/runner/issues/1319.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1610): <!--number 1610 --><!--line 0 --><!--description Y2hvcmU6IHJlbW92ZSBhYmlsaXR5IHRvIHVzZSBzZWNyZXRzIGZvciByZWdpc3RyeSBhdXRoZW50aWNhdGlvbg==-->chore: remove ability to use secrets for registry authentication<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1610
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-10 02:18:33 +00:00
Andreas Ahlenstorf
b04ce67d65 chore: remove lowercasing of cron, timezone attributes (#1609)
Forgejo Runner lowercases the attributes `cron` and `timezone` of a `schedule:` trigger before validating them -- and only those. That is inconsistent with workflow validation, that only accepts the lowercase variants. Furthermore, the rest of Forgejo Runner isn't able to handle any other notation than `cron` and `timezone`, anyway. A workflow like

```yaml
on:
  schedule:
    - CrOn: '* * * * *'
jobs:
  test:
    runs-on: debian
    steps:
      - run: |
          echo OK
```

would not be accepted by Forgejo today. It only leads to the error "notifier_helper.go:579:handleSchedules() [W] no schedule event".

See also https://code.forgejo.org/forgejo/runner/issues/1319.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1609): <!--number 1609 --><!--line 0 --><!--description Y2hvcmU6IHJlbW92ZSBsb3dlcmNhc2luZyBvZiBjcm9uLCB0aW1lem9uZSBhdHRyaWJ1dGVz-->chore: remove lowercasing of cron, timezone attributes<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1609
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-10 02:13:13 +00:00
Renovate Bot
4086a27b8d Update module github.com/vektra/mockery/v3 to v3.7.1 (#1602)
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [github.com/vektra/mockery/v3](https://github.com/vektra/mockery) | `v3.7.0` → `v3.7.1` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fvektra%2fmockery%2fv3/v3.7.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fvektra%2fmockery%2fv3/v3.7.0/v3.7.1?slim=true) |

---

### Release Notes

<details>
<summary>vektra/mockery (github.com/vektra/mockery/v3)</summary>

### [`v3.7.1`](https://github.com/vektra/mockery/releases/tag/v3.7.1)

[Compare Source](https://github.com/vektra/mockery/compare/v3.7.0...v3.7.1)

#### What's Changed

- (feat:template-data) Update documentation of InterfaceFile data by [@&#8203;ymohl-cl](https://github.com/ymohl-cl) in [#&#8203;1149](https://github.com/vektra/mockery/pull/1149)
- fix(cmd): fix file descriptor leak from defer in loop by [@&#8203;SVilgelm](https://github.com/SVilgelm) in [#&#8203;1154](https://github.com/vektra/mockery/pull/1154)
- fix: replace 'interface{}' (old syntax) with 'any', especially for Te… by [@&#8203;aristorinjuang](https://github.com/aristorinjuang) in [#&#8203;1159](https://github.com/vektra/mockery/pull/1159)
- [#&#8203;1151](https://github.com/vektra/mockery/issues/1151): Fix error with InterfaceDirRelative for external paths by [@&#8203;takanuva15](https://github.com/takanuva15) in [#&#8203;1157](https://github.com/vektra/mockery/pull/1157)

#### New Contributors

- [@&#8203;ymohl-cl](https://github.com/ymohl-cl) made their first contribution in [#&#8203;1149](https://github.com/vektra/mockery/pull/1149)
- [@&#8203;aristorinjuang](https://github.com/aristorinjuang) made their first contribution in [#&#8203;1159](https://github.com/vektra/mockery/pull/1159)
- [@&#8203;takanuva15](https://github.com/takanuva15) made their first contribution in [#&#8203;1157](https://github.com/vektra/mockery/pull/1157)

**Full Changelog**: <https://github.com/vektra/mockery/compare/v3.7.0...v3.7.1>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)
- Automerge
  - Between 12:00 AM and 03:59 AM (`* 0-3 * * *`)

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

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

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

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

---

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

Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1602
2026-07-08 20:07:01 +00:00
gtker
2af96a754f feat(interpreter): Add support for case statements (#1590)
Implements https://code.forgejo.org/forgejo/forgejo-actions-feature-requests/issues/101.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1590): <!--number 1590 --><!--line 0 --><!--description ZmVhdChpbnRlcnByZXRlcik6IEFkZCBzdXBwb3J0IGZvciBgY2FzZWAgc3RhdGVtZW50cw==-->feat(interpreter): Add support for `case` statements<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Gtker <dhh@logos.dk>
Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1590
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-07 20:04:20 +00:00
Andreas Ahlenstorf
9a617b497b test: use flags instead of env variables for skipping tests (#1591)
https://code.forgejo.org/forgejo/runner/pulls/1585 introduced the environment variable `TEST_FEATURES` for switching tests related to particular feature on and off. For example, with `TEST_FEATURES=""`, tests that require Docker would be skipped. Unfortunately, that technique has multiple problems. Environment variables might not be passed on to child processes without it being clearly visible. Also, the usage differs by platform. On top of that, informational messages that are only related to testing were printed by the release binary.

Instead of the environment variable `TEST_FEATURES`, the command line flag `-features` is introduced:

```
$  go test ./... -args -features "docker,lxc"
```

That runs all tests that require the presence of Docker and LXC. It is also the default.

If tests that require Docker should be skipped, run:

```
$  go test ./... -args -features "lxc"
```

To exclude all tests that require the presence of a particular feature, run:

```
$  go test ./... -args -features "-"
```

At the moment, `-features` cannot be controlled when using make targets. That means that `make integration-test` runs all tests that require Docker or LXC.

Supersedes  https://code.forgejo.org/forgejo/runner/pulls/1588.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1591): <!--number 1591 --><!--line 0 --><!--description dGVzdDogdXNlIGZsYWdzIGluc3RlYWQgb2YgZW52IHZhcmlhYmxlcyBmb3Igc2tpcHBpbmcgdGVzdHM=-->test: use flags instead of env variables for skipping tests<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1591
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-05 22:26:52 +00:00
Andreas Ahlenstorf
97f483db58 test: use environment variable for skipping Docker tests (#1585)
Tests involving Docker are skipped when `runtime.GOOS` is not `linux`. That is unnecessarily rigid and hinders development. There are other operating systems that can run Docker. It makes it impossible to run integration tests on Linux without Docker. Verifying that all tests that require Docker are skipped without Docker being present is impossible on Linux due to that, too.

Instead of relying on `runtime.GOOS`, developers can control whether tests involving Docker should be run with the help of the environment variable `TEST_FEATURES`.

If the variable is undefined, tests involving Docker will be run, because they are enabled by default:

```
$ make integration-test
```

That is the same as:

```
$ TEST_FEATURES="docker" make integration-test
```

If the variable does not contain the string `docker`, tests involving Docker will be **skipped**:

```
$ TEST_FEATURES="" make integration-test
```

If a test requires Docker, use `testutils.RequireTestFeatures(t, testutils.TestFeatureDocker)` to indicate that.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1585): <!--number 1585 --><!--line 0 --><!--description dGVzdDogdXNlIGVudmlyb25tZW50IHZhcmlhYmxlIGZvciBza2lwcGluZyBEb2NrZXIgdGVzdHM=-->test: use environment variable for skipping Docker tests<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1585
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-03 14:52:02 +00:00
Andreas Ahlenstorf
2df67de412 fix: standardize runner.os and runner.arch (#1583)
Forgejo Runner does not set the context values `runner.os` and `runner.arch` consistently. When jobs run a [platform supported by GitHub](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#runner-context), then the values defined by GitHub are used. Unless the host executor is used on 64-bit ARM, because it expects `aarch64` as input, but `runtime.GOARCH` on 64-bit ARM is `arm64`. On platforms not supported by GitHub, executor-specific values are returned, which makes `runner.os` and `runner.arch` unpredictable and therefore useless. As `runner.os` and `runner.arch` are defined by GitHub and therefore have to be compatible with GitHub Actions, the problem is remedied by only returning values defined by GitHub. If Forgejo Runner is executed on other platforms, the literal string "undefined" (without quotes) is returned. If Microsoft expanded the platform reach of GitHub Actions, "undefined" will be replaced.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- bug fixes
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1583): <!--number 1583 --><!--line 0 --><!--description Zml4OiBzdGFuZGFyZGl6ZSBydW5uZXIub3MgYW5kIHJ1bm5lci5hcmNo-->fix: standardize runner.os and runner.arch<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1583
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-07-03 02:52:09 +00:00
Erwan Leboucher
3750ea0ac3 feat: per-label container platform specification (#1571)
# Per-label container platform specification

Lets a docker runner label declare the OS/architecture passed to the container runtime when pulling and creating images. A single runner on a host that can run several platforms (FreeBSD, macOS) can then serve mixed-platform jobs from one instance, instead of running a separate runner per platform. When the platform is omitted, it keeps being auto-detected, existing configurations are unaffected.

Originating feature request: https://code.forgejo.org/forgejo/forgejo-actions-feature-requests/issues/105

## Usage

String form (CLI --labels, runner.labels list, connection labels):

ubuntu-latest:docker://node:20-bookworm?platform=linux/amd64
freebsd-15:docker://ghcr.io/freebsd/freebsd-runtime:15.0?platform=freebsd/amd64

Mapping form of runner.labels, with image and platform under backend-options:

```
runner:
  labels:
    freebsd-15:
      backend: docker
      backend-options:
        image: ghcr.io/freebsd/freebsd-runtime:15.0
        platform: freebsd/amd64
```

## Design

- Both label forms normalize to a single canonical label string, because runner registration ships labels to the server as strings. The mapping form is sugar over the string form.
- platform is only valid for the docker scheme; platform and image are the only accepted option keys for now, and unknown keys are rejected at startup.
- The platform reaches the container runtime via DefaultPlatform on the job, service, and step containers and the docker-action build. A workflow-level container.options: --platform=... still takes precedence over the per-label default.

This intentionally stays narrow (platform + image) but uses the backend-options shape so it slots into the pluggable-backend work without rework.

## Backwards compatibility

Existing string labels and YAML list labels parse and behave exactly as before; the option query only activates on a literal ?, which never appears in existing image references or LXC arguments.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1571): <!--number 1571 --><!--line 0 --><!--description ZmVhdDogcGVyLWxhYmVsIGNvbnRhaW5lciBwbGF0Zm9ybSBzcGVjaWZpY2F0aW9u-->feat: per-label container platform specification<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1571
Reviewed-by: Andreas Ahlenstorf <aahlenst@noreply.code.forgejo.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-06-20 01:41:19 +00:00
OFHansen
f85b0da6ff feat(jobparser): add support for run-name (#1575)
Adds `RunName` to the Workflow struct, making `run-name` parsable. `workflow_schema.json` already supports `run-name`.

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- features
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/1575): <!--number 1575 --><!--line 0 --><!--description ZmVhdChqb2JwYXJzZXIpOiBhZGQgc3VwcG9ydCBmb3IgYHJ1bi1uYW1lYA==-->feat(jobparser): add support for `run-name`<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/1575
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.code.forgejo.org>
2026-06-18 00:11:22 +00:00