[GH-ISSUE #2681] Multiline expressions in .actrc #1211

Open
opened 2026-03-01 21:49:42 +03:00 by kerem · 2 comments
Owner

Originally created by @wooseopkim on GitHub (Feb 23, 2025).
Original GitHub issue: https://github.com/nektos/act/issues/2681

Act version

0.2.74

Feature description

.actrc performs basic expansion, but its syntax is quite simple. I really appreciate its simplicity for making the format reliable and readable. However, one more functionality would be of great help in my view. It's Bash style multiline expression. In bash, \ is often used to escape newlines, splitting long expressions into multiple lines. I think act also could benefit from its power. This feature would be specifically useful in case of arguments like --container-option which may have long values.

As of now we have to:

--container-option --volume /path/to/somewhere:/var/run/something --privileged --gpus all

It would be much more readable if we could:

--container-option \
  --volume /path/to/somewhere:/var/run/something \
  --privileged \
  --gpus all

Given that --container-option was first introduced with an initial intention of deprecating multiple parameters, it seems reasonable to assume the argument could grow pretty lengthy. For this reason, I suggest multiline expressions for .actrcs.

Originally created by @wooseopkim on GitHub (Feb 23, 2025). Original GitHub issue: https://github.com/nektos/act/issues/2681 ### Act version `0.2.74` ### Feature description `.actrc` performs basic [expansion](https://github.com/nektos/act/blob/16bdce5f1f4cb12d1d205b15deee95ffd1032a82/cmd/root.go#L288), but its syntax is quite simple. I really appreciate its simplicity for making the format reliable and readable. However, one more functionality would be of great help in my view. It's Bash style multiline expression. In bash, `\` is often used to [escape newlines](https://www.gnu.org/software/bash/manual/html_node/Escape-Character.html), splitting long expressions into multiple lines. I think act also could benefit from its power. This feature would be specifically useful in case of arguments like `--container-option` which may have long values. As of now we have to: ``` --container-option --volume /path/to/somewhere:/var/run/something --privileged --gpus all ``` It would be much more readable if we could: ``` --container-option \ --volume /path/to/somewhere:/var/run/something \ --privileged \ --gpus all ``` Given that [`--container-option`](https://github.com/nektos/act/pull/1462) was first introduced with an initial intention of deprecating multiple parameters, it seems reasonable to assume the argument could grow pretty lengthy. For this reason, I suggest multiline expressions for `.actrc`s.
Author
Owner

@panekj commented on GitHub (Feb 23, 2025):

I don't like this and I would like to never expand .actrc parsing in any way. If you need to have more custom formatting, you should use a shell script for that.

<!-- gh-comment-id:2677000505 --> @panekj commented on GitHub (Feb 23, 2025): I don't like this and I would like to never expand `.actrc` parsing in any way. If you need to have more custom formatting, you should use a shell script for that.
Author
Owner

@wooseopkim commented on GitHub (Feb 24, 2025):

I don't like this and I would like to never expand .actrc parsing in any way. If you need to have more custom formatting, you should use a shell script for that.

I see what you're trying to say, and I think you got a solid point. Still I think this humble suggestion is worth measuring its gains (flexibility and readability) against losses (e.g. maintaining burdens and possible error sources). Certainly more than "I dont' like this" or something.

<!-- gh-comment-id:2677666848 --> @wooseopkim commented on GitHub (Feb 24, 2025): > I don't like this and I would like to never expand `.actrc` parsing in any way. If you need to have more custom formatting, you should use a shell script for that. I see what you're trying to say, and I think you got a solid point. Still I think this humble suggestion is worth measuring its gains (flexibility and readability) against losses (e.g. maintaining burdens and possible error sources). Certainly more than "I dont' like this" or something.
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#1211
No description provided.