[PR #1949] [MERGED] Add support for service containers #2206

Closed
opened 2026-03-01 21:54:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1949
Author: @GuessWhoSamFoo
Created: 8/7/2023
Status: Merged
Merged: 10/19/2023
Merged by: @mergify[bot]

Base: masterHead: service-container


📝 Commits (10+)

📊 Changes

14 files changed (+469 additions, -100 deletions)

View changed files

📝 cmd/input.go (+1 -0)
📝 cmd/root.go (+3 -0)
📝 pkg/container/container_types.go (+21 -17)
pkg/container/docker_network.go (+79 -0)
📝 pkg/container/docker_run.go (+34 -16)
📝 pkg/container/docker_run_test.go (+1 -0)
📝 pkg/container/docker_stub.go (+12 -0)
📝 pkg/runner/job_executor.go (+8 -2)
📝 pkg/runner/run_context.go (+208 -25)
📝 pkg/runner/runner.go (+41 -40)
📝 pkg/runner/runner_test.go (+5 -0)
pkg/runner/testdata/services-host-network/push.yml (+14 -0)
pkg/runner/testdata/services-with-container/push.yml (+16 -0)
pkg/runner/testdata/services/push.yaml (+26 -0)

📄 Description

Closes https://github.com/nektos/act/issues/173

This PR cherry picks:

https://gitea.com/gitea/act/pulls/50 is not moved over as it does not exist as a Github Action feature.

Gitea specific features such as createSimpleContainerName and the AutoRemove flag was removed during this process. In addition, ContainerMaxLifetime is also removed as since running /bin/sleep 0 by default can be confusing and doesn't seem to have a use case outside of usage as an sdk.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/1949 **Author:** [@GuessWhoSamFoo](https://github.com/GuessWhoSamFoo) **Created:** 8/7/2023 **Status:** ✅ Merged **Merged:** 10/19/2023 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `service-container` --- ### 📝 Commits (10+) - [`cbc838d`](https://github.com/nektos/act/commit/cbc838d8ad0f4d71cd0d6f414dfbc904394586fd) Support services (#42) - [`5cc4bd0`](https://github.com/nektos/act/commit/5cc4bd063ed631dde114ec08aae11260ec64ec14) Support services options (#45) - [`ca623ce`](https://github.com/nektos/act/commit/ca623cef53706c7e048ebba2e12f8119dc37a5b9) Support intepolation for `env` of `services` (#47) - [`7a09a48`](https://github.com/nektos/act/commit/7a09a4835d85cf902d9418ad92adf74a041a215b) Support services `credentials` (#51) - [`92f9cc7`](https://github.com/nektos/act/commit/92f9cc7a969b112cbbaef95db0ad176ba2a249bf) Add ContainerMaxLifetime and ContainerNetworkMode options - [`bcfbd28`](https://github.com/nektos/act/commit/bcfbd2858320640750ae16a82d7a33641151da2d) Fix container network issue (#56) - [`a168f8f`](https://github.com/nektos/act/commit/a168f8f07ad610dbaa66c812454bb218af7f8a90) Check volumes (#60) - [`78e4613`](https://github.com/nektos/act/commit/78e461384b687842212d0c5c7af095b35b69757b) Remove ContainerMaxLifetime; fix lint - [`2cfb56b`](https://github.com/nektos/act/commit/2cfb56b995227fb61f31409639ffb6b6891b8f74) Remove unused ValidVolumes - [`973a5d8`](https://github.com/nektos/act/commit/973a5d8f54d3648adc88c29c4e9333552760bc4d) Remove ConnectToNetwork ### 📊 Changes **14 files changed** (+469 additions, -100 deletions) <details> <summary>View changed files</summary> 📝 `cmd/input.go` (+1 -0) 📝 `cmd/root.go` (+3 -0) 📝 `pkg/container/container_types.go` (+21 -17) ➕ `pkg/container/docker_network.go` (+79 -0) 📝 `pkg/container/docker_run.go` (+34 -16) 📝 `pkg/container/docker_run_test.go` (+1 -0) 📝 `pkg/container/docker_stub.go` (+12 -0) 📝 `pkg/runner/job_executor.go` (+8 -2) 📝 `pkg/runner/run_context.go` (+208 -25) 📝 `pkg/runner/runner.go` (+41 -40) 📝 `pkg/runner/runner_test.go` (+5 -0) ➕ `pkg/runner/testdata/services-host-network/push.yml` (+14 -0) ➕ `pkg/runner/testdata/services-with-container/push.yml` (+16 -0) ➕ `pkg/runner/testdata/services/push.yaml` (+26 -0) </details> ### 📄 Description Closes https://github.com/nektos/act/issues/173 This PR cherry picks: - https://gitea.com/gitea/act/pulls/42 - https://gitea.com/gitea/act/pulls/45 - https://gitea.com/gitea/act/pulls/47 - https://gitea.com/gitea/act/pulls/51 - https://gitea.com/gitea/act/pulls/56 - https://gitea.com/gitea/act/pulls/60 https://gitea.com/gitea/act/pulls/50 is not moved over as it does not exist as a Github Action feature. Gitea specific features such as `createSimpleContainerName` and the `AutoRemove` flag was removed during this process. In addition, `ContainerMaxLifetime` is also removed as since running `/bin/sleep 0` by default can be confusing and doesn't seem to have a use case outside of usage as an sdk. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:54:27 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#2206
No description provided.