Commit graph

21 commits

Author SHA1 Message Date
ChristopherHX
990cf93c71 feat: don't require docker (#16)
The only reason docker is really required by now, is that act_runner ping docker.
This change only pings docker if a label with `docker://` is added to the runner.

Plain labels without `:` like `self-hosted` are run directly on the system. Previously the pseudo non docker label `-self-hosted` have been required like this `self-hosted:docker://-self-hosted`, but due to docker ping this still required a dockerd to be pingable.

Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/16
Reviewed-by: Jason Song <i@wolfogre.com>
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: ChristopherHX <christopherhx@noreply.gitea.io>
Co-committed-by: ChristopherHX <christopherhx@noreply.gitea.io>
2023-01-27 20:42:02 +08:00
Jason Song
8996b9b0e4 Disable HTTP/2 (#4)
We use [connect-go](https://github.com/bufbuild/connect-go) instead of [grpc-go](https://github.com/grpc/grpc-go) because connect-go support HTTP/1.1, that means we can mount the gRPC api on the Gitea server without change the protocol.

So it doesn't make sense that make the runner support both HTTP/1.1 and HTTP/2, and [upgrade the protocol used on Gitea](
ae018b6b48/modules/graceful/server_http.go (L23)) to support HTTP/2 and h2c. Although it works right now, I believe there'll be lots of problems when the Gitea server is behind a reverse proxy.

So let's KISS, we don't touch the http protocol of Gitea, and disable HTTP/2 for runner. And we would support HTTP/2 in the future if we really need it.

Co-authored-by: Jason Song <i@wolfogre.com>
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/4
2022-11-29 10:35:59 +08:00
Jason Song
2354f5bb18 feat: use specified labels 2022-11-24 15:38:21 +08:00
Bo-Yi.Wu
e9e42e850b chore(runner): remove update runner status
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:38:12 +08:00
Bo-Yi Wu
a13ed0c52e feat(poller): support scheduler to fetch task and dispatch to worker 2022-11-24 15:38:07 +08:00
Lunny Xiao
5fc35faf17 Support bot site 2022-11-24 15:38:06 +08:00
fuxiaohei
bfcc6f56f3 feat(cli): make register interactive stages working 2022-11-24 15:38:05 +08:00
fuxiaohei
8f9d7506dc feat(cli): set interactive stages in register command 2022-11-24 15:38:03 +08:00
Jason Song
88ae188699 fix: ignore stuck because of wrong token 2022-11-24 15:38:02 +08:00
Bo-Yi Wu
d1114da299 chore(runner): wait workflow done before shutdown the service 2022-11-24 15:37:52 +08:00
Bo-Yi.Wu
d178051832 chore(runner): add new token in header
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:43 +08:00
Lunny Xiao
378966e45f add forgeinstance 2022-11-24 15:37:40 +08:00
Lunny Xiao
9c7d2be7c6 Fix bug 2022-11-24 15:37:39 +08:00
Bo-Yi.Wu
e08495af09 chore(runner): remove client secret and add UUID in runner
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:38 +08:00
Bo-Yi.Wu
a503f7429f chore(runner): add new register command
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:36 +08:00
Bo-Yi Wu
d4c1515f4e chore(runner): update runner status if start program 2022-11-24 15:37:32 +08:00
Bo-Yi.Wu
3a1503138b chore(runner): refactor register flow
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:24 +08:00
Bo-Yi.Wu
7486d2ab91 chore(runner): update fetch job request
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:22 +08:00
Bo-Yi.Wu
82431d8e11 chore(runner): support update log and task
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:21 +08:00
Bo-Yi.Wu
449388f3ab chore(gRPC): register new runner
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-11-24 15:37:10 +08:00
Gitea
c5edbbd004 feat: move main task logic to runtime package 2022-11-24 15:37:06 +08:00
Renamed from cmd/damon.go (Browse further)