appleboy and Lunny Xiao
2f78411c3d
ci: standardize code style and update version extraction ( #566 )
...
- Change single quotes to double quotes in YAML files
- Update REPO_VERSION extraction method to use GITHUB_REF_NAME without the 'v' prefix
Signed-off-by: appleboy <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/566
Reviewed-by: Jason Song <[email protected] >
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: appleboy <[email protected] >
Co-committed-by: appleboy <[email protected] >
2024-06-28 07:48:10 +00:00
Bo-Yi Wu and Lunny Xiao
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
Bo-Yi Wu and Lunny Xiao
cf92a979e2
refactor(register): refactor registration functions and improve logging ( #288 )
...
- Remove the else clause in the `registerInteractive` function, and unconditionally log "Runner registered successfully."
- Change the return value in the `doRegister` function from `nil` to `ctx.Err()`.
Signed-off-by: Bo-Yi Wu <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/288
Co-authored-by: Bo-Yi Wu <[email protected] >
Co-committed-by: Bo-Yi Wu <[email protected] >
2023-07-12 14:12:16 +00:00
Bo-Yi Wu and Lunny Xiao
87058716fb
fix(register): refactor context usage in registration functions ( #286 )
...
- Add context parameter to `registerNoInteractive`, `registerInteractive`, and `doRegister` functions
- Remove the creation of a new context in `doRegister`, now using the passed context instead
Signed-off-by: Bo-Yi Wu <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/286
Co-authored-by: Bo-Yi Wu <[email protected] >
Co-committed-by: Bo-Yi Wu <[email protected] >
2023-07-12 13:11:55 +00:00
appleboy and Lunny Xiao
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
Bo-Yi Wu and Lunny Xiao
a83f29d5a9
docs: improve examples README and organization ( #230 )
...
- Update the introduction and descriptions in the examples README
- Add a table with descriptions for each section (docker, docker-compose, kubernetes, vm)
Signed-off-by: Bo-Yi Wu <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/230
Reviewed-by: techknowlogick <[email protected] >
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: Bo-Yi Wu <[email protected] >
Co-committed-by: Bo-Yi Wu <[email protected] >
2023-06-06 02:42:58 +00:00
Bo-Yi Wu and Lunny Xiao
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
Bo-Yi Wu and Jason Song
eef3c32eb2
ci: improve release process and test robustness ( #173 )
...
- Add `.xz` and `.xz.sha256` files to the release extra files in `.goreleaser.yaml`
upload `.xz` and `.xz.sha256` to Gitea release page.

Signed-off-by: Bo-Yi Wu <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/173
Reviewed-by: techknowlogick <[email protected] >
Reviewed-by: Jason Song <[email protected] >
Co-authored-by: Bo-Yi Wu <[email protected] >
Co-committed-by: Bo-Yi Wu <[email protected] >
2023-05-04 09:41:22 +08:00
Bo-Yi Wu and Jason Song
c40b651873
chore: improve Dockerfile, README, and testing settings ( #172 )
...
- Remove `git=2.38.5-r0` from the `apk add` command in Dockerfile
- Update the download link for act_runner in README.md to be a clickable link
Signed-off-by: Bo-Yi Wu <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/172
Reviewed-by: Lunny Xiao <[email protected] >
Reviewed-by: Jason Song <[email protected] >
Co-authored-by: Bo-Yi Wu <[email protected] >
Co-committed-by: Bo-Yi Wu <[email protected] >
2023-05-04 09:36:31 +08:00
appleboy and techknowlogick
b498341857
build: improve compression and update GitHub actions ( #168 )
...
- Add `dist` to .gitignore for gorelease binary folder
- Replace tar command with xz command in .goreleaser.yaml for better compression
ref: https://gitea.com/gitea/homebrew-gitea/pulls/164
Signed-off-by: appleboy <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/168
Reviewed-by: techknowlogick <[email protected] >
Co-authored-by: appleboy <[email protected] >
Co-committed-by: appleboy <[email protected] >
2023-05-01 21:59:43 +08:00
appleboy and Jason Song
0d727eb262
build: optimize Dockerfile and update dependencies ( #162 )
...
- Update base images to golang:1.20-alpine3.17 and alpine:3.17
- Replace `--update-cache` with `--no-cache` in apk add command
- Specify exact versions for make, git, and bash packages
Signed-off-by: appleboy <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/162
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: appleboy <[email protected] >
Co-committed-by: appleboy <[email protected] >
2023-04-29 12:07:15 +08:00
appleboy and Jason Song
49d2cb0cb5
ci: improve API usage and test robustness across platforms ( #159 )
...
- Add `dir: ./dist/` to `.goreleaser.yaml` builds configuration
fix https://gitea.com/gitea/act_runner/issues/158
Signed-off-by: appleboy <[email protected] >
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/159
Reviewed-by: Jason Song <[email protected] >
Co-authored-by: appleboy <[email protected] >
Co-committed-by: appleboy <[email protected] >
2023-04-28 23:46:46 +08:00
appleboy
474683c0e8
docs(readme): update some header. ( #1 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/1
2022-11-24 23:19:25 +08:00
Bo-Yi.Wu and Jason Song
e9e42e850b
chore(runner): remove update runner status
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:38:12 +08:00
Bo-Yi Wu and Jason Song
cab56996b7
fix(poller): initial ready channel
2022-11-24 15:38:08 +08:00
Bo-Yi Wu and Jason Song
a13ed0c52e
feat(poller): support scheduler to fetch task and dispatch to worker
2022-11-24 15:38:07 +08:00
Bo-Yi Wu and Jason Song
9830f34d36
fix(poller): graceful shutdown
2022-11-24 15:38:01 +08:00
Bo-Yi Wu and Jason Song
abdb547b1b
chore(poller): add metric to track the worker number
...
Add metric to track multiple task.
2022-11-24 15:37:53 +08:00
Bo-Yi Wu and Jason Song
d1114da299
chore(runner): wait workflow done before shutdown the service
2022-11-24 15:37:52 +08:00
Bo-Yi.Wu and Jason Song
2442cdd8ad
fix(runner): check task state field exist.
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:45 +08:00
Bo-Yi.Wu and Jason Song
08c94bb564
chore(runner): cancel task if get the cancel from server
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:44 +08:00
Bo-Yi.Wu and Jason Song
d178051832
chore(runner): add new token in header
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:43 +08:00
Bo-Yi.Wu and Jason Song
e08495af09
chore(runner): remove client secret and add UUID in runner
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:38 +08:00
Bo-Yi.Wu and Jason Song
bf5e3dc302
chore(runner): add runner uuid in http header.
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:37 +08:00
Bo-Yi.Wu and Jason Song
a503f7429f
chore(runner): add new register command
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:36 +08:00
Bo-Yi Wu and Jason Song
7bebd2bbad
chore(runner): update runner status when start job
2022-11-24 15:37:34 +08:00
Bo-Yi Wu and Jason Song
d4c1515f4e
chore(runner): update runner status if start program
2022-11-24 15:37:32 +08:00
Bo-Yi Wu and Jason Song
dada0730b0
chore(runner): add default label ""self-hosted"
...
see https://docs.github.com/en/actions/hosting-your-own-runners/using-self-hosted-runners-in-a-workflow#using-default-labels-to-route-jobs
2022-11-24 15:37:27 +08:00
Bo-Yi.Wu and Jason Song
c161a48a0a
chore(register): update proto file.
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:26 +08:00
Bo-Yi.Wu and Jason Song
3a1503138b
chore(runner): refactor register flow
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:24 +08:00
Bo-Yi.Wu and Jason Song
7486d2ab91
chore(runner): update fetch job request
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:22 +08:00
Bo-Yi.Wu and Jason Song
82431d8e11
chore(runner): support update log and task
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:21 +08:00
Bo-Yi.Wu and Jason Song
20c3d85ba9
refactor(task): execute single task with gRPC data
2022-11-24 15:37:19 +08:00
Bo-Yi.Wu and Jason Song
5051e4aebd
chore(runtime): check error message
...
data lock by another runner.
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:18 +08:00
Bo-Yi.Wu and Jason Song
d3d56ed0ef
chore(runtime): fetch build data
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:17 +08:00
Bo-Yi.Wu and Jason Song
631f801aa6
chore(gRPC): fetch new stage data.
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:16 +08:00
Bo-Yi.Wu and Jason Song
9be39b8cd4
chore(gRPC): add update and update step for client
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:13 +08:00
Bo-Yi.Wu and Jason Song
f2fb8798fa
chore(gRPC): add request interface client
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:11 +08:00
Bo-Yi.Wu and Jason Song
449388f3ab
chore(gRPC): register new runner
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:10 +08:00
Bo-Yi.Wu and Jason Song
a3e9bbed25
chore: Add makefile
...
Signed-off-by: Bo-Yi.Wu <[email protected] >
2022-11-24 15:37:09 +08:00
Bo-Yi Wu and Jason Song
7d55fd57c9
chore(piepline): add runtime package.
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:37:01 +08:00
Bo-Yi Wu and Jason Song
bca586ffd0
chore: Add time sleep 1 second.
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:36:58 +08:00
Bo-Yi Wu and Jason Song
d359276fe1
chore(client): support gRPC and gRPC web protocol
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:36:57 +08:00
Bo-Yi Wu and Jason Song
0b885c5e5f
chore(poller): Add poller package
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:36:56 +08:00
Bo-Yi Wu and Jason Song
4d7ef95d40
chore(proto): Add ping request.
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:36:54 +08:00
Bo-Yi Wu and Jason Song
14a345504f
refactor: docker engine with options
2022-11-24 15:36:51 +08:00
Bo-Yi Wu and Jason Song
4eb5213294
chore(engine): ping docker daemon
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:36:49 +08:00
Bo-Yi Wu and Jason Song
9225a3a856
chore(config): remove zerolog
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:36:48 +08:00
Bo-Yi Wu and Jason Song
aa9ed05903
chore: load config from env file
2022-11-24 15:36:30 +08:00
Bo-Yi Wu and Jason Song
5213612033
chore: remove unused logrous package
2022-11-24 15:36:29 +08:00
Bo-Yi Wu and Jason Song
518aa1b2a7
chore: add .golangci config
2022-11-24 15:36:28 +08:00
Bo-Yi Wu and Jason Song
827bd953e7
chore: fix lint error
2022-11-24 15:36:26 +08:00
Bo-Yi Wu and Jason Song
e54de37242
refactor: Add graceful shutdown signal notify func
2022-11-24 15:36:25 +08:00
Bo-Yi Wu and Jason Song
08282a519f
stash
...
Signed-off-by: Bo-Yi Wu <[email protected] >
2022-11-24 15:36:23 +08:00