Christopher Homberger and Lunny Xiao
8920c4a170
Timeout to wait for and optionally require docker always ( #741 )
...
* do not require docker cli in the runner image for waiting for a sidecar dockerd
* allow to specify that `:host` labels would also only be accepted if docker is reachable
Co-authored-by: Lunny Xiao <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/741
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: Christopher Homberger <[email protected] >
Co-committed-by: Christopher Homberger <[email protected] >
2025-08-28 17:28:08 +00:00
Pablo Carranza
6a9a447f86
Report errors by setting raw_output when it's error level ( #645 )
...
This solves #643 by setting the "raw_output" entry attribute when the log level is error. This results in the log line being shipped to the Gitea UI.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/645
Reviewed-by: Zettat123 <[email protected] >
Co-authored-by: Pablo Carranza <[email protected] >
Co-committed-by: Pablo Carranza <[email protected] >
2025-06-05 17:53:13 +00:00
Christopher Homberger and Lunny Xiao
b1ae30dda8
ephemeral act runner ( #649 )
...
Works for both interactive and non-interactive registration mode.
A further enhancement would be jitconfig support of the daemon command, because after some changes in Gitea Actions the registration token became reusable.
removing runner and fail seems not possible at the current api level
Part of https://github.com/go-gitea/gitea/pull/33570
Co-authored-by: Lunny Xiao <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/649
Reviewed-by: Zettat123 <[email protected] >
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: Christopher Homberger <[email protected] >
Co-committed-by: Christopher Homberger <[email protected] >
2025-03-13 21:57:44 +00:00
8bc0275e74
feat: add once flag to daemon command ( #19 ) ( #598 )
...
Once flag polls and completes one job then exits.
I use this with Windows Sandbox (and creating users with local brew install on Mac) to create a fresh environment every time.
Co-authored-by: Garet Halliday <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/598
Reviewed-by: techknowlogick <[email protected] >
Reviewed-by: Jason Song <[email protected] >
Co-authored-by: garet90 <[email protected] >
Co-committed-by: garet90 <[email protected] >
2024-11-06 17:16:08 +00:00
rowan-allspice and Rowan Bohde
d1d3cad4b0
feat: allow graceful shutdowns ( #546 )
...
Add a `Shutdown(context.Context) error` method to the Poller. Calling this method will first shutdown all active polling, preventing any new jobs from spawning. It will then wait for either all jobs to finish, or for the context to be cancelled. If the context is cancelled, it will then force all jobs to end, and then exit.
Fixes https://gitea.com/gitea/act_runner/issues/107
Co-authored-by: Rowan Bohde <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/546
Reviewed-by: Jason Song <[email protected] >
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: rowan-allspice <[email protected] >
Co-committed-by: rowan-allspice <[email protected] >
2024-05-27 07:38:55 +00:00
Jason Song
be2df361ef
Ensure declare to use new labels ( #530 )
...
Ensure "declare" is supported, to use new labels, see https://gitea.com/gitea/act_runner/pulls/529
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/530
Reviewed-by: Lunny Xiao <[email protected] >
2024-04-02 07:39:40 +00:00
Jason Song
23ec12b8cf
Bump act to v0.260.0 ( #522 )
...
Related to https://gitea.com/gitea/act/issues/99 .
Also update other main dependencies.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/522
Reviewed-by: Zettat123 <[email protected] >
2024-03-27 03:17:04 +00:00
TheFox0x7
ed35b09b8f
change podman socket path ( #341 )
...
port of https://github.com/nektos/act/pull/1961
closes gitea/act_runner#274
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/341
Reviewed-by: Jason Song <[email protected] >
Co-authored-by: TheFox0x7 <[email protected] >
Co-committed-by: TheFox0x7 <[email protected] >
2023-08-21 04:01:12 +00:00
Bo-Yi Wu
db662b3690
ci(lint): refactor code for clarity and linting compliance ( #289 )
...
- Removed `deadcode`, `structcheck`, and `varcheck` linters from `.golangci.yml`
- Fixed a typo in a comment in `daemon.go`
- Renamed `defaultActionsUrl` to `defaultActionsURL` in `exec.go`
- Removed unnecessary else clause in `exec.go` and `runner.go`
- Simplified variable initialization in `exec.go`
- Changed function name from `getHttpClient` to `getHTTPClient` in `http.go`
- Removed unnecessary else clause in `labels_test.go`
Signed-off-by: Bo-Yi Wu <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/289
Co-authored-by: Bo-Yi Wu <[email protected] >
Co-committed-by: Bo-Yi Wu <[email protected] >
2023-07-13 01:10:54 +00:00
Zettat123
f2629f2ea3
Add support for finding docker daemon from common socket paths ( #263 )
...
Caused by #260
act_runner will fail to start if user does not set `docker_host` configuration and `DOCKER_HOST` env. This PR adds the support for finding docker daemon from common socket paths so act_runner could detect the docker socket from these paths.
The `commonSocketPaths` is from [nektos/act](https://github.com/nektos/act/blob/e60018a6d9403b27bfd1a1ed6111a6e9de0032fd/cmd/root.go#L124-L131 )
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/263
Co-authored-by: Zettat123 <[email protected] >
Co-committed-by: Zettat123 <[email protected] >
2023-07-01 01:27:54 +00:00
Zettat123
ccc27329dc
Improve the usage of docker_host configuration ( #260 )
...
Follow #242 , #244
Fixes #258
Users could use `docker_host` configuration to specify which docker daemon will be used by act_runner.
- If `docker_host` is **empty**, act_runner will find an available docker host automatically.
- If `docker_host` is **"-"**, act_runner will find an available docker host automatically, but the docker host won't be mounted to the job containers and service containers.
- If `docker_host` is **not empty or "-"**, the specified docker host will be used. An error will be returned if it doesn't work.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/260
Co-authored-by: Zettat123 <[email protected] >
Co-committed-by: Zettat123 <[email protected] >
2023-06-30 04:00:04 +00:00
appleboy
9e4a5f7363
feat: improve Docker configuration and detection handling ( #242 )
...
- Pass `cfg` to `envcheck.CheckIfDockerRunning` function
- Add `Docker` struct to `config.go` for Docker configuration
- Update `config.example.yaml` with `docker` configuration options
- Modify `CheckIfDockerRunning` in `docker.go` to use Docker host from config if provided
Signed-off-by: appleboy <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/242
Reviewed-by: Lunny Xiao <[email protected] >
Reviewed-by: wxiaoguang <[email protected] >
Co-authored-by: appleboy <[email protected] >
Co-committed-by: appleboy <[email protected] >
2023-06-18 05:38:38 +00:00
sillyguodong and Jason Song
67b1363d25
Support changing labels ( #201 )
...
Implement proposal: https://github.com/go-gitea/gitea/issues/24540
Related:
- Protocol: https://gitea.com/gitea/actions-proto-def/pulls/9
- Gitea side: https://github.com/go-gitea/gitea/pull/24806
Co-authored-by: Jason Song <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/201
Reviewed-by: Jason Song <[email protected] >
Co-authored-by: sillyguodong <[email protected] >
Co-committed-by: sillyguodong <[email protected] >
2023-06-15 03:59:15 +00:00
Bo-Yi Wu
69c55ee003
refactor: daemon, config, and logging for better clarity ( #225 )
...
- Import "path", "runtime", "strconv", and "strings" packages in daemon.go
- Move "Starting runner daemon" log message to a different location
- Refactor log formatter initialization and add debug level caller information
- Split Config struct into separate Log, Runner, Cache, and Container structs with comments in config.go
Signed-off-by: Bo-Yi Wu <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/225
Reviewed-by: Jason Song <[email protected] >
Co-authored-by: Bo-Yi Wu <[email protected] >
Co-committed-by: Bo-Yi Wu <[email protected] >
2023-06-05 13:11:23 +00:00
Jason Song
220efa69c0
Refactor to new framework ( #98 )
...
- Adjust directory structure
```text
├── internal
│ ├── app
│ │ ├── artifactcache
│ │ ├── cmd
│ │ ├── poll
│ │ └── run
│ └── pkg
│ ├── client
│ ├── config
│ ├── envcheck
│ ├── labels
│ ├── report
│ └── ver
└── main.go
```
- New pkg `labels` to parse label
- New pkg `report` to report logs to Gitea
- Remove pkg `engine`, use `envcheck` to check if docker running.
- Rewrite `runtime` to `run`
- Rewrite `poller` to `poll`
- Simplify some code and remove what's useless.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/98
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Co-committed-by: Jason Song <[email protected] >
2023-04-04 21:32:04 +08:00