A daemon that connects to a Forgejo instance and runs jobs for continuous integration. The installation and usage instructions are part of the Forgejo documentation https://forgejo.org/docs/next/admin/actions/
Find a file
Renovate Bot 92518a9a74
Update module github.com/vektra/mockery/v2 to v3 (#841)
This PR contains the following updates:

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

---

### Release Notes

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

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

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

#### What's Changed

- Fix bug with replace-type not working with pointers by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1099

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.5.1...v3.5.2

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

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

#### What's Changed

- Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in https://github.com/vektra/mockery/pull/1081

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.5.0...v3.5.1

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

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

#### What's Changed

- Add `inpackage` flag to override in-package detection logic by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1077
- Add `include-auto-generated` config option by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1079
- Fix issue with rendering multiple templates from same interface by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1080

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.4.0...v3.5.0

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

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

#### What's Changed

- Fix issue with type alias to interface not being generated by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1074

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.6...v3.4.0

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

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

#### What's Changed

- Separate release into reusable github action by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1071
- Fix matryer template imports when outputting mock to different package than source by [@&#8203;chadwpetersen](https://github.com/chadwpetersen) in https://github.com/vektra/mockery/pull/1061
- Fix issue in koanf v2.2.1 by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1068

#### New Contributors

- [@&#8203;chadwpetersen](https://github.com/chadwpetersen) made their first contribution in https://github.com/vektra/mockery/pull/1061

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.5...v3.3.6

### [`v3.3.5`](https://github.com/vektra/mockery/compare/v3.3.4...v3.3.5)

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

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

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

#### What's Changed

- Ditch pathlib and fix Windows bugs by [@&#8203;kgadams](https://github.com/kgadams) in https://github.com/vektra/mockery/pull/1062

#### New Contributors

- [@&#8203;kgadams](https://github.com/kgadams) made their first contribution in https://github.com/vektra/mockery/pull/1062

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.2...v3.3.4

### [`v3.3.3`](https://github.com/vektra/mockery/compare/v3.3.2...v3.3.3)

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

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

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

#### What's Changed

- Fix anchors causing panics by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1058
- Fix issue with relative `dir` values causing invalid in-package calculation by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1059

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.1...v3.3.2

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

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

#### What's Changed

- Fix issue when no value specified for variadic arg by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1055
- Bump github.com/spf13/viper from 1.15.0 to 1.20.1 in /tools by [@&#8203;peczenyj](https://github.com/peczenyj) in https://github.com/vektra/mockery/pull/1036

#### New Contributors

- [@&#8203;peczenyj](https://github.com/peczenyj) made their first contribution in https://github.com/vektra/mockery/pull/1036

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.3.0...v3.3.1

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

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

#### What's Changed

- Fix uppercase generic type parameters by [@&#8203;fen4o](https://github.com/fen4o) in https://github.com/vektra/mockery/pull/1022
- Add parameter type to EXPECT method doc comments. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1034
- Fix missing dependency by running go mod tidy by [@&#8203;miner46er](https://github.com/miner46er) in https://github.com/vektra/mockery/pull/1045
- Fix issue with nil in `.Run()` causing panic by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1043
- Fix unroll-variadic default in v3 migration by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1054

#### New Contributors

- [@&#8203;fen4o](https://github.com/fen4o) made their first contribution in https://github.com/vektra/mockery/pull/1022
- [@&#8203;miner46er](https://github.com/miner46er) made their first contribution in https://github.com/vektra/mockery/pull/1045

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.5...v3.3.0

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

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

#### What's Changed

- Disable `goimports` from messing with imports by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1032
- Fix mockery reading auto-generated files by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1029

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.4...v3.2.5

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

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

#### What's Changed

- Recursive package generation regex fix by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1026
- Fix variadic parameter handling in `.EXPECT().Run()` by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1027
- Fix unknown `MOCKERY_` env vars causing panics by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1028

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.3...v3.2.4

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

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

#### What's Changed

- Mention PackageName template variable deprecation by [@&#8203;thejan2009](https://github.com/thejan2009) in https://github.com/vektra/mockery/pull/1018

#### New Contributors

- [@&#8203;thejan2009](https://github.com/thejan2009) made their first contribution in https://github.com/vektra/mockery/pull/1018

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.2...v3.2.3

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

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

#### What's Changed

- Fix issue with scope lookup returning nil by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1010
- Fix variadic mock generation when `unroll-variadic: false`. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1011

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.1...v3.2.2

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

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

#### What's Changed

- Fix invalid generation when variadic has no return values by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1007

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.2.0...v3.2.1

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

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

#### What's Changed

- Fix `with-expecter` in migrate command by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1002
- Change `force-file-write` default to be `true`. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1003
- Fix issue with variadic arguments from return function provider by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/1004
- Bump github.com/go-git/go-git/v5 from 5.12.0 to 5.13.0 in /tools by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/vektra/mockery/pull/1005
- Bump golang.org/x/net from 0.33.0 to 0.36.0 in /tools by [@&#8203;dependabot](https://github.com/dependabot) in https://github.com/vektra/mockery/pull/1006

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.1.0...v3.2.0

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

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

#### What's Changed

- v3: Build release with latest stable Go version by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/998
- v3: Add `*ast.GenDecl` and `*ast.TypeSpec` comments to `template.Interface` by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/999

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.2...v3.1.0

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

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

#### What's Changed

- v3: Fix constructor name not respecting exported-ness by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/995

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.1...v3.0.2

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

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

#### What's Changed

- Fixing the v3 docs configuration by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/986
- v3: Fix `mockery init` failing by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/994

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.0...v3.0.1

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

[Compare Source](https://github.com/vektra/mockery/compare/v2.53.4...v3.0.0)

#### What's Changed

- v3: Update docs and release for v3 GA. by [@&#8203;LandonTClipp](https://github.com/LandonTClipp) in https://github.com/vektra/mockery/pull/985

**Full Changelog**: https://github.com/vektra/mockery/compare/v3.0.0-beta.11...v3.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **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 [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS41MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuNTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

<!--start release-notes-assistant-->
<!--URL:https://code.forgejo.org/forgejo/runner-->
- other
  - [PR](https://code.forgejo.org/forgejo/runner/pulls/841): <!--number 841 --><!--line 0 --><!--description VXBkYXRlIG1vZHVsZSBnaXRodWIuY29tL3Zla3RyYS9tb2NrZXJ5L3YyIHRvIHYz-->Update module github.com/vektra/mockery/v2 to v3<!--description-->
<!--end release-notes-assistant-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/841
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Renovate Bot <bot@kriese.eu>
Co-committed-by: Renovate Bot <bot@kriese.eu>
2025-08-11 05:33:56 +00:00
.forgejo chore: links to container images and documentation in the release (#811) 2025-08-05 14:00:27 +00:00
.github/workflows chore: restore GitHub windows build workflow (#815) 2025-08-07 08:56:39 +00:00
act fix: prevent unintended input replacement in reusable workflows with workflow_dispatch when using workflow_call (#833) 2025-08-10 19:37:14 +00:00
contrib Restore contrib/forgejo-runner.service (#772) 2025-07-30 22:16:05 +00:00
examples Update code.forgejo.org/forgejo/runner Docker tag to v9 (#838) 2025-08-10 21:10:03 +00:00
internal fix: prevent space prefix/suffix in runner labels (#829) 2025-08-10 15:43:34 +00:00
release-notes feat: add the runner validate subcommand (#757) 2025-07-31 05:37:12 +00:00
testutils feat: add the runner validate subcommand (#757) 2025-07-31 05:37:12 +00:00
.dockerignore [FORGEJO] build forgejo-runner 2023-08-23 14:44:47 +02:00
.editorconfig Add .editorconfig and .gitattributes (#186) 2023-05-13 23:51:22 +08:00
.gitattributes Add .editorconfig and .gitattributes (#186) 2023-05-13 23:51:22 +08:00
.gitignore chore: remove unused code and comments including gitea 2025-07-03 18:58:11 +02:00
.golangci.yml chore: disable package name checks for revive [skip cascade] (#750) 2025-07-28 12:26:08 +00:00
Dockerfile Update data.forgejo.org/oci/alpine Docker tag to v3.22 (#616) 2025-06-18 05:43:57 +00:00
go.mod Update module golang.org/x/term to v0.34.0 (#837) 2025-08-10 20:16:40 +00:00
go.sum Update module golang.org/x/term to v0.34.0 (#837) 2025-08-10 20:16:40 +00:00
LICENSE chore: update LICENSE year 2025-07-03 18:58:11 +02:00
main.go chore: to allow the runner to be imported, v9 needs to be in the go module (#777) 2025-07-31 10:35:11 +00:00
Makefile Update module github.com/vektra/mockery/v2 to v3 (#841) 2025-08-11 05:33:56 +00:00
README.md chore: remove the alpha quality warning, it is secure enough to be used in production (#774) 2025-08-10 20:21:05 +00:00
RELEASE-NOTES.md chore: release notes are now published together with the release (#775) 2025-07-31 08:02:20 +00:00
renovate.json chore(renovate): ignore all test data 2025-07-31 10:01:23 +02:00

Forgejo Runner

A daemon that connects to a Forgejo instance and runs jobs for continuous integration. The installation and usage instructions are part of the Forgejo documentation.

Reporting bugs

When filing a bug in the issue tracker, it is very helpful to propose a pull request in the end-to-end tests repository that adds a reproducer. It will fail the CI and unambiguously demonstrate that the problem exists. In most cases it is enough to add a workflow (see the echo example). For more complicated cases it is also possible to add a runner config file as well as shell scripts to setup and teardown the test case (see the service example).

Sensitive security-related issues should be reported to security@forgejo.org using encryption.

License

The Forgejo runner source code is distributed under the terms of the following licenses:

Architectures & OS

The Forgejo runner is supported and tested on amd64 and arm64 (binaries and containers) on Operating Systems based on the Linux kernel.

Work may be in progress for other architectures and you can browse the corresponding issues to figure out how they make progress. If you are interested in helping them move forward, open an issue. The most challenging part is to setup and maintain a native runner long term. Once it is supported by Forgejo, the runner is expected to be available 24/7 which can be challenging. Otherwise debugging any architecture specific problem won't be possible.

Hacking

The Forgejo runner is a dependency of the setup-forgejo action. See the full dependency graph for a global view.

Building

  • Install Go and make(1)
  • make build

The test workflow is a full example that builds the binary, runs the tests and launches the runner binary against a live Forgejo instance.

Generate mocks

  • make deps-tools
  • make generate

If there are changes, commit them to the repository.

Local debug

The repositories are checked out in the same directory:

Install dependencies

The dependencies are installed manually or with:

setup-forgejo/forgejo-dependencies.sh

Build the Forgejo runner

cd runner ; rm -f forgejo-runner ; make forgejo-runner

Launch Forgejo and the runner

A Forgejo instance is launched with:

cd setup-forgejo
./forgejo.sh setup
firefox $(cat forgejo-url)

The user is root with password admin1234. The runner is registered with:

cd setup-forgejo
docker exec --user 1000 forgejo forgejo actions generate-runner-token > forgejo-runner-token
../runner/forgejo-runner register --no-interactive --instance "$(cat forgejo-url)" --name runner --token $(cat forgejo-runner-token) --labels docker:docker://node:22-bookworm,self-hosted:host,lxc:lxc://debian:bookworm

And launched with:

cd setup-forgejo ; ../runner/forgejo-runner --config runner-config.yml daemon

Note that the runner-config.yml is required in that particular case to configure the network in bridge mode, otherwise the runner will create a network that cannot reach the forgejo instance.

Try a sample workflow

From the Forgejo web interface, create a repository and add the following to .forgejo/workflows/try.yaml. It will launch the job and the result can be observed from the actions tab.

on: [push]
jobs:
  ls:
    runs-on: docker
    steps:
      - uses: actions/checkout@v4
      - run: |
          ls ${{ github.workspace }}