Jason Song
c41ede2e4d
Merge branch 'main' into fix-nil-map-reading-env-file
2023-11-24 01:43:56 +00:00
Jason Song
00e9b3d62b
Bump act ( #394 )
...
Bump act to follow https://gitea.com/gitea/act/pulls/81
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/394
Reviewed-by: Lunny Xiao <[email protected] >
2023-10-31 15:03:07 +00:00
Jason Song and Lunny Xiao
7fc1b91ba6
Update to go1.21 in Dockerfile.rootless ( #332 )
...
Follow #330
Fix https://gitea.com/gitea/act_runner/pulls/330#issuecomment-747099
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/332
Reviewed-by: Lunny Xiao <[email protected] >
Reviewed-by: appleboy <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Co-committed-by: Jason Song <[email protected] >
2023-08-12 00:37:08 +00:00
Jason Song
5d01cb8904
Add tips in config file ( #297 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/297
2023-07-20 02:16:30 +00:00
Jason Song
cf48ed88ba
Revert supporting multiple default actions URLs and use github for exec by default ( #262 )
...
## ⚠️ BREAKING ⚠️
Follow https://github.com/go-gitea/gitea/pull/25581 and gitea/act#70 .
- Revert "Parse multiple default actions URLs (#200 )"
- Revert "fix defaultActionsUrls config for exec (#233 )"
- Use `https://github.com ` for exec by default.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/262
2023-06-30 07:53:18 +00:00
Jason Song
054c8d912f
Move docker.host to container.docker_host ( #244 )
...
Follow #242 .
Move `docker.host` to `container.docker_host`.
There are already some options for docker/container in `container`, so developers could get confused about where to add options.
It's breaking, but I think it's OK since `docker.host` was added just two days ago.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/244
Reviewed-by: Lunny Xiao <[email protected] >
2023-06-19 09:01:16 +00:00
Jason Song
45bfe0a9b2
Accept empty file as config ( #241 )
...
Close #240
`yaml.Decoder.Decode` will return EOF when the root node is nil , see https://github.com/go-yaml/yaml/blob/v3/yaml.go#L125
While `yaml.Unmarshal` will accept it, see https://github.com/go-yaml/yaml/blob/v3/yaml.go#L162
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/241
Reviewed-by: Zettat123 <[email protected] >
2023-06-15 05:40:37 +00:00
Jason Song
316534996a
Build docker image gitea/act_runner/x.y.z-dind-rootless ( #239 )
...
Follow #208
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/239
Reviewed-by: Zettat123 <[email protected] >
2023-06-15 05:27:35 +00:00
Jason Song
a29307a9d9
Remove hadolint and improve Dockerfile ( #234 )
...
Replace #190
See:
- https://gitea.com/gitea/act_runner/pulls/190#issuecomment-741196
- https://gitea.com/gitea/act_runner/pulls/208#issuecomment-741049
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/234
Reviewed-by: Lunny Xiao <[email protected] >
Reviewed-by: silverwind <[email protected] >
Reviewed-by: delvh <[email protected] >
2023-06-09 02:50:30 +00:00
Jason Song
de4160b023
Skip counting log length when parseLogRow return nil ( #176 )
...
Fix:

Regression of #149 , `LogLength` could be incorrect.
It may be related to https://github.com/go-gitea/gitea/issues/24458
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/176
Reviewed-by: Zettat123 <[email protected] >
Reviewed-by: wxiaoguang <[email protected] >
2023-05-06 17:00:52 +08:00
Jason Song
0c029f7e79
Upgrade act and use new artifactcache ( #174 )
...
- Upgrade act to v0.245.1
- Replace `gitea.com/gitea/act_runner/internal/app/artifactcache` with `github.com/nektos/act/pkg/artifactcache`
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/174
Reviewed-by: Lunny Xiao <[email protected] >
2023-05-04 18:45:01 +08:00
Jason Song
0cf31b2d22
Update docker image tag ( #153 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/153
2023-04-27 15:02:39 +08:00
Jason Song
3be962cdb3
Rename the download folder from main -> nightly ( #152 )
...
Close https://gitea.com/gitea/act_runner/issues/117
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/152
2023-04-27 12:23:15 +08:00
Jason Song
a5edbc9ac4
Release docker images ( #151 )
...
Did some tests to make sure it worked.
See https://hub.docker.com/r/gitea/act_runner/tags
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/151
2023-04-27 12:08:41 +08:00
Jason Song and Lunny Xiao
83ec0ba909
Support upload outputs and use needs context ( #133 )
...
See [Example usage of the needs context](https://docs.github.com/en/actions/learn-github-actions/contexts#example-usage-of-the-needs-context ).
Related to:
- [actions-proto-def #5 ](https://gitea.com/gitea/actions-proto-def/pulls/5 )
- [gitea #24230 ](https://github.com/go-gitea/gitea/pull/24230 )
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/133
Reviewed-by: Lunny Xiao <[email protected] >
Reviewed-by: Zettat123 <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Co-committed-by: Jason Song <[email protected] >
2023-04-20 23:27:46 +08:00
Jason Song
ed86e2f15a
Update workflow files ( #131 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/131
2023-04-19 17:46:52 +08:00
Jason Song
d4bebccc12
Update dependencies ( #130 )
...
Related to:
- https://gitea.com/gitea/act/pulls/44
- https://gitea.com/gitea/actions-proto-def/pulls/5
- https://gitea.com/gitea/actions-proto-def/pulls/7
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/130
2023-04-19 16:50:07 +08:00
Jason Song and Lunny Xiao
d5caee38f2
Add prefix to use ghaction-import-gpg ( #120 )
...
See https://gitea.com/gitea/act_runner/actions/runs/254
Related to #116
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/120
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Co-committed-by: Jason Song <[email protected] >
2023-04-13 18:18:39 +08:00
Jason Song and Lunny Xiao
c248520a66
Set specific environments to distinguish between Gitea and GitHub ( #113 )
...
Close https://github.com/go-gitea/gitea/issues/24038
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/113
Reviewed-by: techknowlogick <[email protected] >
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Co-committed-by: Jason Song <[email protected] >
2023-04-12 14:44:26 +08:00
Jason Song and Lunny Xiao
9c6499ec08
Fix panic when response is nil ( #105 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/105
Reviewed-by: Lunny Xiao <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Co-committed-by: Jason Song <[email protected] >
2023-04-06 21:51:46 +08:00
Jason Song
d139faa40c
Supports configuring fetch_timeout and fetch_interval. ( #100 )
...
Fix #99 .
Fix #94 .
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/100
Reviewed-by: Zettat123 <[email protected] >
2023-04-06 10:57:36 +08:00
Jason Song and Lunny Xiao
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
Jason Song
df3cb60978
Config for container network ( #96 )
...
Fix #66
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/96
Reviewed-by: Lunny Xiao <[email protected] >
2023-04-04 14:32:01 +08:00
Jason Song
7e7096e60b
Refactor environment variables to configuration and registration ( #90 )
...
Close #21 .
Refactor environment variables to configuration file (config.yaml) and registration file (.runner).
The old environment variables are still supported, but warning logs will be printed.
Like:
```text
$ GITEA_DEBUG=true ./act_runner -c config.yaml daemon
INFO[0000] Starting runner daemon
WARN[0000] env GITEA_DEBUG has been ignored because config file is used
$ GITEA_DEBUG=true ./act_runner daemon
INFO[0000] Starting runner daemon
WARN[0000] env GITEA_DEBUG will be deprecated, please use config file instead
```
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/90
Reviewed-by: Lunny Xiao <[email protected] >
2023-04-02 22:41:48 +08:00
Jason Song
c9e076db68
Get outbound IP in multiple ways or disable cache server if failed to init ( #74 )
...
Fix #64 (incompletely).
It's still not ideal. It makes more sense to use the gateway IP address of container network as outbound IP of cache server. However, this requires act to cooperate, some think like:
- act creates the network for new container, and returns the network to runner.
- runner extracts the gateway IP in the network.
- runner uses the gateway IP as outbound IP, and pass it to act as cache server endpoint.
- act It continues to create the container with the created network.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/74
Reviewed-by: Lunny Xiao <[email protected] >
2023-03-24 17:55:13 +08:00
Jason Song
bc1842d649
Vet code ( #73 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/73
2023-03-24 15:10:39 +08:00
Jason Song
90b8cc6a7a
Clarify labels ( #69 )
...
The label will follow the format `label[:schema[:args]]`, and the schema will be `host` if it's omitted. So
- `ubuntu:docker://node:18`: Run jobs with label `ubuntu` via docker with image `node:18`
- `ubuntu:host`: Run jobs with label `ubuntu` on the host directly.
- `ubuntu`: Same as `ubuntu:host`.
- `ubuntu:vm:ubuntu-latest`: (Just a example, not Implemented) Run jobs with label `ubuntu` via virtual machine with iso `ubuntu-latest`.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/69
Reviewed-by: Zettat123 <[email protected] >
Reviewed-by: wxiaoguang <[email protected] >
2023-03-23 20:48:33 +08:00
Jason Song
4d5a35ac65
Upgrade act ( #68 )
...
Related to https://gitea.com/gitea/act/pulls/27
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/68
2023-03-23 13:33:17 +08:00
Jason Song
48b05a0ca8
Upgrade act to support go actions ( #62 )
...
See:
- https://gitea.com/gitea/act/pulls/20
- https://gitea.com/gitea/act/pulls/22
- https://gitea.com/gitea/act/pulls/26
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/62
Reviewed-by: Zettat123 <[email protected] >
2023-03-21 16:33:08 +08:00
Jason Song
4d868b7f3c
Update act to v0.243 ( #54 )
...
- Update act to v0.243.1
- Disable artifacts server when run daemon.
- Adjust cmd.
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/54
Reviewed-by: Zettat123 <[email protected] >
2023-03-17 09:45:46 +08:00
Jason Song and Lunny Xiao
436b441cad
Support cache ( #25 )
...
See [Caching dependencies to speed up workflows](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows ).
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/25
Reviewed-by: Lunny Xiao <[email protected] >
Reviewed-by: Zettat123 <[email protected] >
Co-authored-by: Jason Song <[email protected] >
Co-committed-by: Jason Song <[email protected] >
2023-02-28 23:39:30 +08:00
Jason Song
410765b516
Upgrade act ( #24 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/24
2023-02-24 14:23:22 +08:00
Jason Song
06b9c3962e
Upgrade act ( #23 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/23
2023-02-24 12:16:18 +08:00
Jason Song
0b64655a40
Upgrade act ( #22 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/22
2023-02-24 10:23:18 +08:00
Jason Song
75820a6a3e
Upgrade act to v0.234.2 ( #20 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/20
2023-02-15 16:53:23 +08:00
Jason Song
cf27d3f300
Update act to 0.234.1 ( #12 )
...
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/12
2023-01-06 18:32:01 +08:00
Jason Song
03c4c4e116
docs: add quickstart to readme
2022-11-24 16:38:42 +08:00
Jason Song
b3e7d6a62d
fix: update container config
2022-11-24 15:38:22 +08:00
Jason Song
2354f5bb18
feat: use specified labels
2022-11-24 15:38:21 +08:00
Jason Song
5781e233c1
fix: limit workers
2022-11-24 15:38:20 +08:00
Jason Song
f05e08a767
chore: update grpc router path
2022-11-24 15:38:19 +08:00
Jason Song
64c9856ba7
fix: set more image
2022-11-24 15:38:17 +08:00
Jason Song
66ec50e427
chore: upgrade act
2022-11-24 15:38:16 +08:00
Jason Song
44988db9f8
chore: replace with code.gitea.io/bots-proto-go
2022-11-24 15:38:15 +08:00
Jason Song
8f950ccec0
feat: auto remove containers
2022-11-24 15:38:11 +08:00
Jason Song
ab4e06f977
feat: support post step log
2022-11-24 15:38:09 +08:00
Jason Song
88ae188699
fix: ignore stuck because of wrong token
2022-11-24 15:38:02 +08:00
Jason Song
2e1326b725
fix: set NoSkipCheckout
2022-11-24 15:37:58 +08:00
Jason Song
cbd21b8ec5
feat: avoid reuse of containers
2022-11-24 15:37:51 +08:00
Jason Song
d650bae0b6
feat: replace ciphertext in log
2022-11-24 15:37:50 +08:00
Jason Song
93e42d1465
fix: call RunDaemon
2022-11-24 15:37:47 +08:00
Jason Song
2f879c41c4
chore: remove tracing codes
2022-11-24 15:37:42 +08:00
Jason Song
41b5fa6b55
fix: update step result
2022-11-24 15:37:41 +08:00
Jason Song
cce60d466b
fix: need more time to run task
2022-11-24 15:37:35 +08:00