-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for service containers #1949
Commits on Aug 14, 2023
-
Removed createSimpleContainerName and AutoRemove flag Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: Jason Song <[email protected]> Reviewed-on: https://gitea.com/gitea/act/pulls/42 Reviewed-by: Jason Song <[email protected]> Co-authored-by: Zettat123 <[email protected]> Co-committed-by: Zettat123 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cbc838d - Browse repository at this point
Copy the full SHA cbc838dView commit details -
Support services options (nektos#45)
Reviewed-on: https://gitea.com/gitea/act/pulls/45 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: Zettat123 <[email protected]> Co-committed-by: Zettat123 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5cc4bd0 - Browse repository at this point
Copy the full SHA 5cc4bd0View commit details -
Support intepolation for
env
ofservices
(nektos#47)Reviewed-on: https://gitea.com/gitea/act/pulls/47 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: Zettat123 <[email protected]> Co-committed-by: Zettat123 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ca623ce - Browse repository at this point
Copy the full SHA ca623ceView commit details -
Support services
credentials
(nektos#51)If a service's image is from a container registry requires authentication, `act_runner` will need `credentials` to pull the image, see [documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idcredentials). Currently, `act_runner` incorrectly uses the `credentials` of `containers` to pull services' images and the `credentials` of services won't be used, see the related code: https://gitea.com/gitea/act/src/commit/0c1f2edb996a87ee17dcf3cfa7259c04be02abd7/pkg/runner/run_context.go#L228-L269 Co-authored-by: Jason Song <[email protected]> Reviewed-on: https://gitea.com/gitea/act/pulls/51 Reviewed-by: Jason Song <[email protected]> Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: Zettat123 <[email protected]> Co-committed-by: Zettat123 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7a09a48 - Browse repository at this point
Copy the full SHA 7a09a48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 92f9cc7 - Browse repository at this point
Copy the full SHA 92f9cc7View commit details -
Fix container network issue (nektos#56)
Follow: https://gitea.com/gitea/act_runner/pulls/184 Close https://gitea.com/gitea/act_runner/issues/177 - `act` create new networks only if the value of `NeedCreateNetwork` is true, and remove these networks at last. `NeedCreateNetwork` is passed by `act_runner`. 'NeedCreateNetwork' is true only if `container.network` in the configuration file of the `act_runner` is empty. - In the `docker create` phase, specify the network to which containers will connect. Because, if not specify , container will connect to `bridge` network which is created automatically by Docker. - If the network is user defined network ( the value of `container.network` is empty or `<custom-network>`. Because, the network created by `act` is also user defined network.), will also specify alias by `--network-alias`. The alias of service is `<service-id>`. So we can be access service container by `<service-id>:<port>` in the steps of job. - Won't try to `docker network connect ` network after `docker start` any more. - Because on the one hand, `docker network connect` applies only to user defined networks, if try to `docker network connect host <container-name>` will return error. - On the other hand, we just specify network in the stage of `docker create`, the same effect can be achieved. - Won't try to remove containers and networks berfore the stage of `docker start`, because the name of these containers and netwoks won't be repeat. Co-authored-by: Jason Song <[email protected]> Reviewed-on: https://gitea.com/gitea/act/pulls/56 Reviewed-by: Jason Song <[email protected]> Co-authored-by: sillyguodong <[email protected]> Co-committed-by: sillyguodong <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bcfbd28 - Browse repository at this point
Copy the full SHA bcfbd28View commit details -
This PR adds a `ValidVolumes` config. Users can specify the volumes (including bind mounts) that can be mounted to containers by this config. Options related to volumes: - [jobs.<job_id>.container.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainervolumes) - [jobs.<job_id>.services.<service_id>.volumes](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idservicesservice_idvolumes) In addition, volumes specified by `options` will also be checked. Currently, the following default volumes (see https://gitea.com/gitea/act/src/commit/a72822b3f83d3e68ffc697101b713b7badf57e2f/pkg/runner/run_context.go#L116-L166) will be added to `ValidVolumes`: - `act-toolcache` - `<container-name>` and `<container-name>-env` - `/var/run/docker.sock` (We need to add a new configuration to control whether the docker daemon can be mounted) Co-authored-by: Jason Song <[email protected]> Reviewed-on: https://gitea.com/gitea/act/pulls/60 Reviewed-by: Jason Song <[email protected]> Co-authored-by: Zettat123 <[email protected]> Co-committed-by: Zettat123 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a168f8f - Browse repository at this point
Copy the full SHA a168f8fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78e4613 - Browse repository at this point
Copy the full SHA 78e4613View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2cfb56b - Browse repository at this point
Copy the full SHA 2cfb56bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 973a5d8 - Browse repository at this point
Copy the full SHA 973a5d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 197d19d - Browse repository at this point
Copy the full SHA 197d19dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 83c1304 - Browse repository at this point
Copy the full SHA 83c1304View commit details -
Fix the error when removing network in self-hosted mode (nektos#69)
Fixes https://gitea.com/gitea/act_runner/issues/255 Reviewed-on: https://gitea.com/gitea/act/pulls/69 Co-authored-by: Zettat123 <[email protected]> Co-committed-by: Zettat123 <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fee22cd - Browse repository at this point
Copy the full SHA fee22cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for b84f831 - Browse repository at this point
Copy the full SHA b84f831View commit details -
Add --network flag; default to host if not using service containers o…
…r set explicitly
Configuration menu - View commit details
-
Copy full SHA for d0aad7f - Browse repository at this point
Copy the full SHA d0aad7fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3711e0d - Browse repository at this point
Copy the full SHA 3711e0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7480591 - Browse repository at this point
Copy the full SHA 7480591View commit details
Commits on Aug 22, 2023
-
Configuration menu - View commit details
-
Copy full SHA for f3b7953 - Browse repository at this point
Copy the full SHA f3b7953View commit details -
Configuration menu - View commit details
-
Copy full SHA for e90c543 - Browse repository at this point
Copy the full SHA e90c543View commit details -
Configuration menu - View commit details
-
Copy full SHA for 779ad2a - Browse repository at this point
Copy the full SHA 779ad2aView commit details
Commits on Sep 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 1e8ce80 - Browse repository at this point
Copy the full SHA 1e8ce80View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f0639c - Browse repository at this point
Copy the full SHA 0f0639cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bad75c - Browse repository at this point
Copy the full SHA 5bad75cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f5f3cf - Browse repository at this point
Copy the full SHA 5f5f3cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 10ab2db - Browse repository at this point
Copy the full SHA 10ab2dbView commit details
Commits on Sep 4, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 5ce86a6 - Browse repository at this point
Copy the full SHA 5ce86a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for ce9437f - Browse repository at this point
Copy the full SHA ce9437fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed086f2 - Browse repository at this point
Copy the full SHA ed086f2View commit details
Commits on Oct 11, 2023
-
Always remove service containers
Although we usually keep containers running if the workflow errored (unless `--rm` is given) in order to facilitate debugging and we have a flag (`--reuse`) to always keep containers running in order to speed up repeated `act` invocations, I believe that these should only apply to job containers and not service containers, because changing the network settings on a service container requires re-creating it anyway.
Configuration menu - View commit details
-
Copy full SHA for 8e5b4f9 - Browse repository at this point
Copy the full SHA 8e5b4f9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 092a41c - Browse repository at this point
Copy the full SHA 092a41cView commit details
Commits on Oct 13, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 41b68eb - Browse repository at this point
Copy the full SHA 41b68ebView commit details
Commits on Oct 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 0f701ec - Browse repository at this point
Copy the full SHA 0f701ecView commit details
Commits on Oct 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 93089ed - Browse repository at this point
Copy the full SHA 93089edView commit details