2022-04-27 12:45:53 +03:00
module gitea . com / gitea / act_runner
2023-03-17 04:45:46 +03:00
go 1.20
2022-04-27 12:45:53 +03:00
require (
2023-04-19 11:50:07 +03:00
code . gitea . io / actions - proto - go v0 . 2.1
2023-02-28 18:39:30 +03:00
code . gitea . io / gitea - vet v0 . 2.3 - 0.20230113022436 - 2 b1561217fa5
2022-12-06 11:37:38 +03:00
github . com / avast / retry - go / v4 v4 . 3.1
github . com / bufbuild / connect - go v1 . 3.1
2023-05-04 13:45:01 +03:00
github . com / docker / docker v23 . 0.4 + incompatible
2023-03-17 04:45:46 +03:00
github . com / joho / godotenv v1 . 5.1
2023-04-24 22:16:01 +03:00
github . com / mattn / go - isatty v0 . 0.18
2022-11-22 10:34:13 +03:00
github . com / nektos / act v0 . 0.0
2022-08-12 09:59:58 +03:00
github . com / sirupsen / logrus v1 . 9.0
2023-05-04 13:45:01 +03:00
github . com / spf13 / cobra v1 . 7.0
github . com / stretchr / testify v1 . 8.2
2023-04-24 22:16:01 +03:00
golang . org / x / term v0 . 7.0
2023-04-04 16:32:04 +03:00
golang . org / x / time v0 . 1.0
2022-09-25 13:54:00 +03:00
google . golang . org / protobuf v1 . 28.1
2023-04-02 17:41:48 +03:00
gopkg . in / yaml . v3 v3 . 0.1
2023-04-04 16:32:04 +03:00
gotest . tools / v3 v3 . 4.0
2022-04-27 12:45:53 +03:00
)
require (
2023-03-17 04:45:46 +03:00
github . com / Azure / go - ansiterm v0 . 0.0 - 20170929234023 - d6e3b3328b78 / / indirect
2022-04-27 12:45:53 +03:00
github . com / Masterminds / semver v1 . 5.0 / / indirect
2022-08-12 09:59:58 +03:00
github . com / Microsoft / go - winio v0 . 5.2 / / indirect
2023-05-04 13:45:01 +03:00
github . com / ProtonMail / go - crypto v0 . 0.0 - 20230217124315 - 7 d5c6f04bbb8 / / indirect
github . com / acomagu / bufpipe v1 . 0.4 / / indirect
github . com / cloudflare / circl v1 . 1.0 / / indirect
github . com / containerd / containerd v1 . 6.20 / / indirect
2022-12-06 11:37:38 +03:00
github . com / creack / pty v1 . 1.18 / / indirect
2023-04-04 16:32:04 +03:00
github . com / davecgh / go - spew v1 . 1.1 / / indirect
2023-05-04 13:45:01 +03:00
github . com / docker / cli v23 . 0.4 + incompatible / / indirect
2022-04-27 12:45:53 +03:00
github . com / docker / distribution v2 . 8.1 + incompatible / / indirect
2023-03-17 04:45:46 +03:00
github . com / docker / docker - credential - helpers v0 . 7.0 / / indirect
2022-04-27 12:45:53 +03:00
github . com / docker / go - connections v0 . 4.0 / / indirect
2023-03-17 04:45:46 +03:00
github . com / docker / go - units v0 . 5.0 / / indirect
2023-05-04 13:45:01 +03:00
github . com / emirpasic / gods v1 . 18.1 / / indirect
github . com / fatih / color v1 . 15.0 / / indirect
2022-04-27 12:45:53 +03:00
github . com / go - git / gcfg v1 . 5.0 / / indirect
2023-03-17 04:45:46 +03:00
github . com / go - git / go - billy / v5 v5 . 4.1 / / indirect
2023-05-04 13:45:01 +03:00
github . com / go - git / go - git / v5 v5 . 6.2 - 0.20230411180853 - ce62f3e9ff86 / / indirect
2022-04-27 12:45:53 +03:00
github . com / gogo / protobuf v1 . 3.2 / / indirect
2023-04-04 16:32:04 +03:00
github . com / google / go - cmp v0 . 5.9 / / indirect
2022-11-22 10:34:13 +03:00
github . com / google / shlex v0 . 0.0 - 20191202100458 - e7afc7fbc510 / / indirect
2023-05-04 13:45:01 +03:00
github . com / imdario / mergo v0 . 3.15 / / indirect
github . com / inconshreveable / mousetrap v1 . 1.0 / / indirect
2022-04-27 12:45:53 +03:00
github . com / jbenet / go - context v0 . 0.0 - 20150711004518 - d14ea06fba99 / / indirect
github . com / julienschmidt / httprouter v1 . 3.0 / / indirect
github . com / kballard / go - shellquote v0 . 0.0 - 20180428030007 - 95032 a82bc51 / / indirect
2022-08-12 09:59:58 +03:00
github . com / kevinburke / ssh_config v1 . 2.0 / / indirect
2023-03-17 04:45:46 +03:00
github . com / klauspost / compress v1 . 15.12 / / indirect
2023-05-06 12:00:52 +03:00
github . com / kr / pretty v0 . 3.0 / / indirect
2022-09-25 13:54:00 +03:00
github . com / mattn / go - colorable v0 . 1.13 / / indirect
2023-03-17 04:45:46 +03:00
github . com / mattn / go - runewidth v0 . 0.14 / / indirect
2023-05-06 12:00:52 +03:00
github . com / mitchellh / mapstructure v1 . 5.0 / / indirect
2023-05-04 13:45:01 +03:00
github . com / moby / buildkit v0 . 11.6 / / indirect
2023-03-17 04:45:46 +03:00
github . com / moby / patternmatcher v0 . 5.0 / / indirect
github . com / moby / sys / sequential v0 . 5.0 / / indirect
2022-04-27 12:45:53 +03:00
github . com / opencontainers / go - digest v1 . 0.0 / / indirect
2023-05-04 13:45:01 +03:00
github . com / opencontainers / image - spec v1 . 1.0 - rc2 . 0.20221005185240 - 3 a7f492d3f1b / / indirect
github . com / opencontainers / runc v1 . 1.5 / / indirect
2023-03-17 04:45:46 +03:00
github . com / opencontainers / selinux v1 . 11.0 / / indirect
2023-05-04 13:45:01 +03:00
github . com / pjbgf / sha1cd v0 . 3.0 / / indirect
2022-04-27 12:45:53 +03:00
github . com / pkg / errors v0 . 9.1 / / indirect
2023-04-04 16:32:04 +03:00
github . com / pmezard / go - difflib v1 . 0.0 / / indirect
2023-05-04 13:45:01 +03:00
github . com / rhysd / actionlint v1 . 6.24 / / indirect
github . com / rivo / uniseg v0 . 4.4 / / indirect
2022-04-27 12:45:53 +03:00
github . com / robfig / cron v1 . 2.0 / / indirect
github . com / sergi / go - diff v1 . 2.0 / / indirect
2023-05-04 13:45:01 +03:00
github . com / skeema / knownhosts v1 . 1.0 / / indirect
2022-04-27 12:45:53 +03:00
github . com / spf13 / pflag v1 . 0.5 / / indirect
2023-05-06 12:00:52 +03:00
github . com / stretchr / objx v0 . 5.0 / / indirect
2023-05-04 13:45:01 +03:00
github . com / timshannon / bolthold v0 . 0.0 - 20210913165410 - 232392 fc8a6a / / indirect
github . com / xanzy / ssh - agent v0 . 3.3 / / indirect
2022-11-22 10:34:13 +03:00
github . com / xeipuuv / gojsonpointer v0 . 0.0 - 20180127040702 - 4 e3ac2762d5f / / indirect
github . com / xeipuuv / gojsonreference v0 . 0.0 - 20180127040603 - bd5ef7bd5415 / / indirect
2023-03-17 04:45:46 +03:00
github . com / xeipuuv / gojsonschema v1 . 2.0 / / indirect
2023-05-04 13:45:01 +03:00
go . etcd . io / bbolt v1 . 3.7 / / indirect
golang . org / x / crypto v0 . 6.0 / / indirect
2023-04-24 22:16:01 +03:00
golang . org / x / net v0 . 9.0 / / indirect
2023-04-04 16:32:04 +03:00
golang . org / x / sync v0 . 1.0 / / indirect
2023-04-24 22:16:01 +03:00
golang . org / x / sys v0 . 7.0 / / indirect
golang . org / x / tools v0 . 8.0 / / indirect
2022-04-27 12:45:53 +03:00
gopkg . in / warnings . v0 v0 . 1.2 / / indirect
2022-11-22 10:34:13 +03:00
gopkg . in / yaml . v2 v2 . 4.0 / / indirect
2022-04-27 12:45:53 +03:00
)
2022-07-27 06:36:48 +03:00
Add configuration item of `container.network` (#184)
Close https://gitea.com/gitea/act_runner/issues/177
Related https://gitea.com/gitea/act/pulls/56
### ⚠️ Breaking
The `container.network_mode` is a deprecated configuration item. It may be removed after Gitea 1.20 released.
Previously, if the value of `container.network_mode` is `bridge`, it means that `act_runner` will create a new network for job.But `bridge` is easily confused with the bridge network created by Docker by default.
We recommand that using `container.network` to specify the network to which containers created by `act_runner` connect.
### 🆕 container.network
The configuration file of `act_runner` add a new item of `contianer.network`.
In `config.example.yaml`:
```yaml
container:
# Specifies the network to which the container will connect.
# Could be host, bridge or the name of a custom network.
# If it's empty, act_runner will create a network automatically.
network: ""
```
As the comment in the example above says, the purpose of the `container.network` is specifying the network to which containers created by `act_runner` will connect.
`container.network` accepts the following valid values:
- `host`: All of containers (including job containers and service contianers) created by `act_runner` will be connected to the network named `host` which is created automatically by Docker. Containers will share the host’s network stack and all interfaces from the host will be available to these containers.
- `bridge`: It is similar to `host`. All of containers created by `act_runner` will be connected to the network named `bridge` which is created automatically by Docker. All containers connected to the `bridge` (Perhaps there are containers that are not created by `act_runner`) are allowed to communicate with each other, while providing isolation from containers which are not connected to that `bridge` network.
- `<custom_network>`: Please make sure that the `<custom_network>` network already exists firstly (`act_runner` does not detect whether the specified network exists currently. If not exists yet, will return error in the stage of `docker create`). All of containers created by `act_runner` will be connected to `<custom_network>`. After the job is executed, containers are removed and automatically disconnected from the `<custom_network>`.
- empty: `act_runner` will create a new network for each job container and their service containers (if defined in workflow). So each job container and their service containers share a network environment, but are isolated from others container and the Docker host. Of course, these networks created by `act_runner` will be removed at last.
### Others
- If you do not have special needs, we highly recommend that setting `container.network` to empty string (and do not use `container.network_mode` any more). Because the containers created by `act_runner` will connect to the networks that are created by itself. This point will provide better isolation.
- If you set `contianer.network` to empty string or `<custom_network>`, we can be access to service containers by `<service-id>:<port>` in the steps of job. Because we added an alias to the service container when connecting to the network.
Co-authored-by: Jason Song <i@wolfogre.com>
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/184
Reviewed-by: Jason Song <i@wolfogre.com>
Co-authored-by: sillyguodong <gedong_1994@163.com>
Co-committed-by: sillyguodong <gedong_1994@163.com>
2023-05-16 09:46:59 +03:00
replace github . com / nektos / act = > gitea . com / gitea / act v0 . 245.2 - 0.20230516060355 - 9283 cfc9b166