1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-31 18:30:58 +00:00
Forgejo runner - alpha release, should not be considered secure enough to deploy in production
Find a file
Renovate Bot 39d9bc5e5f
Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.8 (#690)
This PR contains the following updates:

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

---

### Release Notes

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

### [`v1.64.8`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1648)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.7...v1.64.8)

- Detects use of configuration files from golangci-lint v2

### [`v1.64.7`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1647)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.6...v1.64.7)

1. Linters bug fixes
   - `depguard`: from 2.2.0 to 2.2.1
   - `dupl`: from [`3e9179a`](3e9179ac44) to [`f665c8d`](f665c8d69b)
   - `gosec`: from 2.22.1 to 2.22.2
   - `staticcheck`: from 0.6.0 to 0.6.1
2. Documentation
   - Add GitLab documentation

### [`v1.64.6`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1646)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.5...v1.64.6)

1. Linters bug fixes
   - `asciicheck`: from 0.4.0 to 0.4.1
   - `contextcheck`: from 1.1.5 to 1.1.6
   - `errcheck`: from 1.8.0 to 1.9.0
   - `exptostd`: from 0.4.1 to 0.4.2
   - `ginkgolinter`: from 0.19.0 to 0.19.1
   - `go-exhaustruct`: from 3.3.0 to 3.3.1
   - `gocheckcompilerdirectives`: from 1.2.1 to 1.3.0
   - `godot`: from 1.4.20 to 1.5.0
   - `perfsprint`: from 0.8.1 to 0.8.2
   - `revive`: from 1.6.1 to 1.7.0
   - `tagalign`: from 1.4.1 to 1.4.2

### [`v1.64.5`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1645)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.4...v1.64.5)

1. Bug fixes
   - Add missing flag `new-from-merge-base-flag`
2. Linters bug fixes
   - `asciicheck`: from 0.3.0 to 0.4.0
   - `forcetypeassert`: from 0.1.0 to 0.2.0
   - `gosec`: from 2.22.0 to 2.22.1

### [`v1.64.4`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1644)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.3...v1.64.4)

1. Linters bug fixes
   - `gci`: fix standard packages list for go1.24

### [`v1.64.3`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1643)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.2...v1.64.3)

1. Linters bug fixes
   - `ginkgolinter`: from 0.18.4 to 0.19.0
   - `go-critic`: from 0.11.5 to 0.12.0
   - `revive`: from 1.6.0 to 1.6.1
   - `gci`: fix standard packages list for go1.24
2. Misc.
   - Build Docker images with go1.24

### [`v1.64.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1642)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.1...v1.64.2)

This is the last minor release of golangci-lint v1.
The next release will be golangci-lint [v2](https://github.com/golangci/golangci-lint/issues/5300).

1. Enhancements
   - 🎉 go1.24 support
   - New `issues.new-from-merge-base` option
   - New `run.relative-path-mode` option
2. Linters new features
   - `copyloopvar`: from 1.1.0 to 1.2.1 (support suggested fixes)
   - `exptostd`: from 0.3.1 to 0.4.1 (handles `golang.org/x/exp/constraints.Ordered`)
   - `fatcontext`: from 0.5.3 to 0.7.1 (new option: `check-struct-pointers`)
   - `perfsprint`: from 0.7.1 to 0.8.1 (new options: `integer-format`, `error-format`, `string-format`, `bool-format`, and `hex-format`)
   - `revive`: from 1.5.1 to 1.6.0 (new rules: `redundant-build-tag`, `use-errors-new`. New option `early-return.early-return`)
3. Linters bug fixes
   - `go-errorlint`: from 1.7.0 to 1.7.1
   - `gochecknoglobals`: from 0.2.1 to 0.2.2
   - `godox`: from [`006bad1`](006bad1f9d) to 1.1.0
   - `gosec`: from 2.21.4 to 2.22.0
   - `iface`: from 1.3.0 to 1.3.1
   - `nilnesserr`: from 0.1.1 to 0.1.2
   - `protogetter`: from 0.3.8 to 0.3.9
   - `sloglint`: from 0.7.2 to 0.9.0
   - `spancheck`: fix default `StartSpanMatchersSlice` values
   - `staticcheck`: from 0.5.1 to 0.6.0
4. Deprecations
   - ⚠️ `tenv` is deprecated and replaced by `usetesting.os-setenv: true`.
   - ⚠️ `exportloopref` deprecation step 2
5. Misc.
   - Sanitize severities by output format
   - Avoid panic with plugin without description
6. Documentation
   - Clarify `depguard` configuration

### [`v1.64.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1641)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.64.0...v1.64.1)

Cancelled due to CI failure.

### [`v1.64.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1640)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.4...v1.64.0)

Cancelled due to CI failure.

### [`v1.63.4`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1634)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.3...v1.63.4)

1. Linters bug fixes
   - `dupl`, `gomodguard`, `revive`: keep only Go-files.

### [`v1.63.3`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1633)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.2...v1.63.3)

1. Linters bug fixes
   - `gofmt`, `gofumpt`, `goimports`, `gci`: panic with several trailing EOL
   - `goheader`: skip issues with invalid positions

### [`v1.63.2`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1632)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.1...v1.63.2)

1. Linters bug fixes
   - `gofmt`, `gofumpt`, `goimports`, `gci`: panic with missing trailing EOL

### [`v1.63.1`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1631)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.63.0...v1.63.1)

1. Linters bug fixes
   - `cgi`: invalid reports with cgo
   - `gofumpt`: panic with autofix and cgo

### [`v1.63.0`](https://github.com/golangci/golangci-lint/blob/HEAD/CHANGELOG.md#v1630)

[Compare Source](https://github.com/golangci/golangci-lint/compare/v1.62.2...v1.63.0)

1. Enhancements
   - Add support for SuggestedFixes 🎉 (35 linters can "autofix" reports).
   - Formatters (`gofmt`, `goimports`, `gofumpt`, `gci`) are applied after the suggested fixes.
2. New linters
   - Add `exptostd` linter https://github.com/ldez/exptostd
   - Add `nilnesserr` linter https://github.com/alingse/nilnesserr
   - Add `usetesting` linter https://github.com/ldez/usetesting
3. Linters new features
   - `gci`: new options: `no-inline-comments`, `no-prefix-comments`
   - `gomoddirectives`: from 0.2.4 to 0.6.0 (new options: `go-version-pattern`, `toolchain-pattern`,`toolchain-forbidden`, `tool-forbidden`, `go-debug-forbidden`)
   - `govet`: new `stdversion`, `waitgroup` analyzers
   - `importas`: allow multiple empty aliases
   - `loggercheck`: new `slog` option
   - `recvcheck`: from 0.1.2 to 0.2.0 (new options: `disable-builtin`, `exclusions`)
   - `tagliatelle`: from 0.5.0 to 0.7.1 (new options: `ignored-fields`, `extended-rules`,`overrides`, `pkg`, `ignore`)
   - `usestdlibvars`: from 1.27.0 to 1.28.0 (autofix)
   - `wrapcheck`: from 2.9.0 to 2.10.0 (new option: `extra-ignore-sigs`)
4. Linters bug fixes
   - `asciicheck`: from 0.2.0 to 0.3.0
   - `bodyclose`: from [`5742072`](5742072509) to [`ed6a65f`](ed6a65f985)
   - `funlen`: from 0.1.0 to 0.2.0
   - `ginkgolinter`: from 0.18.3 to 0.18.4
   - `gochecksumtype`: from 0.2.0 to 0.3.1
   - `gocognit`: from 1.1.3 to 1.2.0
   - `godot`: from 1.4.18 to 1.4.20
   - `goheader`: report position improvement
   - `gosec`: handling of global nosec option when it is false
   - `iface`: from 1.2.1 to 1.3.0
   - `importas`: from 0.1.0 to 0.2.0
   - `intrange`: from 0.2.1 to 0.3.0
   - `makezero`: from 1.1.1 to 1.2.0
   - `mirror`: from 1.2.0 to 1.3.0
   - `nilnil`: from 1.0.0 to 1.0.1
   - `nosprintfhostport`: from 0.1.1 to 0.2.0
   - `reassign`: from 0.2.0 to 0.3.0
   - `spancheck`: from 0.6.2 to 0.6.4
   - `tagalign`: from 1.3.4 to 1.4.1
   - `wastedassign`: from 2.0.7 to 2.1.0
   - `whitespace`: from 0.1.1 to 0.2.0
   - `wsl`: from 4.4.1 to 4.5.0
5. Deprecations
   - ⚠️ `output.uniq-by-line` is deprecated and replaced by `issues.uniq-by-line`.
6. Misc.
   - Improvements of the help command (color and JSON support).
   - Removes `decoder`, `sloglint`, `tagalign` from `format` preset.
   - Enables paths with junction inside Windows.
   - The timeout is disabled if `run.timeout` <= 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:eyJjcmVhdGVkSW5WZXIiOiI0MS4yMy4yIiwidXBkYXRlZEluVmVyIjoiNDEuMjMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/690
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-07-12 07:52:16 +00:00
.forgejo chore: s/GITHUB_*/FORGEJO_*/ & s/github./forge./ (#682) 2025-07-10 14:41:49 +00:00
.github/workflows chore: s|gitea.com/gitea/act_runner|runner.forgejo.org| 2025-07-03 19:07:02 +02:00
contrib Fix comments in systemd unit service file (#274) 2024-09-18 13:40:32 +00:00
examples feat: lxc-systemd defaults to using Forgejo runner 7.0.0 (#674) 2025-07-07 18:42:22 +00:00
internal chore(lint): add lint to the CI and make it happy (#685) 2025-07-11 07:57:23 +00:00
scripts add instructions to run under systemd user services 2024-02-19 09:09:57 +01: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(lint): add lint to the CI and make it happy (#685) 2025-07-11 07:57:23 +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.33.0 (#687) 2025-07-11 05:43:08 +00:00
go.sum Update module golang.org/x/term to v0.33.0 (#687) 2025-07-11 05:43:08 +00:00
LICENSE chore: update LICENSE year 2025-07-03 18:58:11 +02:00
main.go chore: s|gitea.com/gitea/act_runner|runner.forgejo.org| 2025-07-03 19:07:02 +02:00
Makefile Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v1.64.8 (#690) 2025-07-12 07:52:16 +00:00
README.md chore(tests): add mockery and instructions to use it (#651) 2025-07-03 16:41:05 +00:00
RELEASE-NOTES.md chore(docs): update v7.0.0 release notes (take 6) 2025-07-07 14:39:54 +02:00
renovate.json chore(renovate): drop explicit config in favor of preset 2025-05-12 11:23:24 +02:00

Forgejo Runner

WARNING: this is alpha release quality code and should not be considered secure enough to deploy in production.

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).

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 depends on a fork of ACT and 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 with the local ACT

The Forgejo runner is rebuilt with the ACT directory by changing the runner/go.mod file to:

replace github.com/nektos/act => ../act

Running:

cd runner ; go mod tidy

Building:

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:20-bullseye,self-hosted:host://-self-hosted,lxc:lxc://debian:bullseye

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 }}