[GH-ISSUE #123] Use multiline secrets #83

Closed
opened 2026-03-01 21:39:56 +03:00 by kerem · 9 comments
Owner

Originally created by @Applelo on GitHub (Mar 4, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/123

I would like to pass a multi-lines secrets like a SSH KEY but it seems impossible currently with the .act file or with the prompt.

Can you consider to add this feature or maybe a workaround to this issue ?

Originally created by @Applelo on GitHub (Mar 4, 2020). Original GitHub issue: https://github.com/nektos/act/issues/123 I would like to pass a multi-lines secrets like a SSH KEY but it seems impossible currently with the .act file or with the prompt. Can you consider to add this feature or maybe a workaround to this issue ?
Author
Owner

@cplee commented on GitHub (Mar 5, 2020):

I believe a workaround is to put the secret in a file and use:

act -s MY_SECRET="$(< secret.txt)"
<!-- gh-comment-id:594971182 --> @cplee commented on GitHub (Mar 5, 2020): I believe a workaround is to put the secret in a file and use: ``` act -s MY_SECRET="$(< secret.txt)" ```
Author
Owner

@cplee commented on GitHub (Mar 5, 2020):

Here's a thought @Applelo. Would you want act to support a config file in ~/.config/act/secrets.yml that you define your secrets in?

<!-- gh-comment-id:594971736 --> @cplee commented on GitHub (Mar 5, 2020): Here's a thought @Applelo. Would you want act to support a config file in `~/.config/act/secrets.yml` that you define your secrets in?
Author
Owner

@Applelo commented on GitHub (Mar 6, 2020):

Thanks for you quick answer. So I have try your workaround but it seems to not working. Act return nothing and stop.

Also when I tried to add more secrets, your program return Error: accepts at most 1 arg(s), received 4

My .act file

-s SSH_PRIVATE_KEY="$(< ~/.config/act/ssh.txt)" GITHUB_PACKAGES_TOKEN="🤫" CONFIG_FILE="$(< ~/.config/act/config.js)"

Yeah, I am ok to have an act folder with a secrets.yml. It would be nice to store some files also in this folder 👍 (like an ssh key for example ^^).

<!-- gh-comment-id:595795049 --> @Applelo commented on GitHub (Mar 6, 2020): Thanks for you quick answer. So I have try your workaround but it seems to not working. Act return nothing and stop. Also when I tried to add more secrets, your program return `Error: accepts at most 1 arg(s), received 4` My .act file ``` -s SSH_PRIVATE_KEY="$(< ~/.config/act/ssh.txt)" GITHUB_PACKAGES_TOKEN="🤫" CONFIG_FILE="$(< ~/.config/act/config.js)" ``` Yeah, I am ok to have an act folder with a `secrets.yml`. It would be nice to store some files also in this folder 👍 (like an ssh key for example ^^).
Author
Owner

@cplee commented on GitHub (Mar 6, 2020):

fixed in #133

<!-- gh-comment-id:595952974 --> @cplee commented on GitHub (Mar 6, 2020): fixed in #133
Author
Owner

@FirzenYogesh commented on GitHub (Aug 6, 2020):

Hi, @cplee
does the multiline secret work only on the prompt?
I have been trying to use it from file i have declared the secret in .actrc and a value in .env for that secret

eg:
.actrc
-s SECRET_VAR="$(< $SECRET_VAR)"
.env
SECRET_VAR=/path/to/file

this does not work

but on command line prompt it works if i feed the value directly or through environment variable

<!-- gh-comment-id:670055823 --> @FirzenYogesh commented on GitHub (Aug 6, 2020): Hi, @cplee does the multiline secret work only on the prompt? I have been trying to use it from file i have declared the secret in .actrc and a value in .env for that secret eg: .actrc `-s SECRET_VAR="$(< $SECRET_VAR)"` .env `SECRET_VAR=/path/to/file` this does not work but on command line prompt it works if i feed the value directly or through environment variable
Author
Owner

@slmingol commented on GitHub (May 8, 2021):

@FirzenYogesh prob. should open a new question/issue since this one was closed.

<!-- gh-comment-id:835581864 --> @slmingol commented on GitHub (May 8, 2021): @FirzenYogesh prob. should open a new question/issue since this one was closed.
Author
Owner

@leonardorrodrigues commented on GitHub (Sep 11, 2025):

🤖 AutoQA Results

📁 Task: example_task

  • Setup Only: FAILED (expected)
  • Setup + Solution: PASSED
  • Overall: PASSED

Status: ALL TESTS PASSED

🎉 All 1 tasks passed verification!


🤖 AutoQA Bot - Ensuring task quality and compliance

<!-- gh-comment-id:3280193887 --> @leonardorrodrigues commented on GitHub (Sep 11, 2025): ## 🤖 AutoQA Results ### 📁 Task: `example_task` - **Setup Only**: ✅ FAILED (expected) - **Setup + Solution**: ✅ PASSED - **Overall**: ✅ PASSED **Status**: ✅ ALL TESTS PASSED 🎉 All 1 tasks passed verification! --- *🤖 AutoQA Bot - Ensuring task quality and compliance*
Author
Owner

@leonardorrodrigues commented on GitHub (Sep 11, 2025):

🤖 AutoQA Results

📁 Task: example_task

  • Setup Only: FAILED (expected)
  • Setup + Solution: PASSED
  • Overall: PASSED

Status: ALL TESTS PASSED

🎉 All 1 modified task(s) passed verification!


🤖 AutoQA Bot - Ensuring task quality and compliance

<!-- gh-comment-id:3280314745 --> @leonardorrodrigues commented on GitHub (Sep 11, 2025): ## 🤖 AutoQA Results ### 📁 Task: `example_task` - **Setup Only**: ✅ FAILED (expected) - **Setup + Solution**: ✅ PASSED - **Overall**: ✅ PASSED **Status**: ✅ ALL TESTS PASSED 🎉 All 1 modified task(s) passed verification! --- *🤖 AutoQA Bot - Ensuring task quality and compliance*
Author
Owner

@makeavish commented on GitHub (Dec 25, 2025):

🤖 Hi @nektos/act, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

<!-- gh-comment-id:3691629064 --> @makeavish commented on GitHub (Dec 25, 2025): 🤖 Hi @nektos/act, I've received your request, and I'm working on it now! You can track my progress [in the logs](https://github.com/nektos/act/actions/runs/1) for more details.
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#83
No description provided.