Act: Use multiline secrets

Created on 4 Mar 2020  路  5Comments  路  Source: nektos/act

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 ?

arecli kinfeature-request metworkaround

Most helpful comment

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

act -s MY_SECRET="$(< secret.txt)"

All 5 comments

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

act -s MY_SECRET="$(< secret.txt)"

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?

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 ^^).

fixed in #133

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kenorb picture kenorb  路  5Comments

ovitente picture ovitente  路  6Comments

mheap picture mheap  路  5Comments

seed-of-apricot picture seed-of-apricot  路  6Comments

Sygmei picture Sygmei  路  3Comments