[PR #1740] [CLOSED] allow command line container options to be appended to workflow specified options #2103

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1740
Author: @eljohnson92
Created: 4/18/2023
Status: Closed

Base: masterHead: override_container_options


📝 Commits (1)

  • 45f3b7f allow command line container options to be added workflow specified options

📊 Changes

1 file changed (+5 additions, -3 deletions)

View changed files

📝 pkg/runner/run_context.go (+5 -3)

📄 Description

This PR allows for command line options passed through --container-options to override any specified in the workflow file. It fixes #1696 which is needed for situations where you need to override a container option just in act and not in the GHA themselves.

In the GIthubs section on Container Options they call out they do not support the --network option for containers because they run containers explicitly in the bridge network and you cannot specify the --network flag twice in an invocation. With this change, ACT users can run both GHA and ACT runs from the same workflow file with the same network type.


🔄 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/1740 **Author:** [@eljohnson92](https://github.com/eljohnson92) **Created:** 4/18/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `override_container_options` --- ### 📝 Commits (1) - [`45f3b7f`](https://github.com/nektos/act/commit/45f3b7ff77ddaacb496be48ca635449af53f37c2) allow command line container options to be added workflow specified options ### 📊 Changes **1 file changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/run_context.go` (+5 -3) </details> ### 📄 Description This PR allows for command line options passed through `--container-options` to override any specified in the workflow file. It fixes #1696 which is needed for situations where you need to override a container option just in act and not in the GHA themselves. In the GIthubs section on [Container Options](https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container#setting-container-resource-options) they call out they do not support the `--network` option for containers because they run containers explicitly in the bridge network and you cannot specify the `--network` flag twice in an invocation. With this change, ACT users can run both GHA and ACT runs from the same workflow file with the same network type. --- <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:01 +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#2103
No description provided.