[GH-ISSUE #636] Enhancement: Secrets Exec Support #416

Closed
opened 2026-03-01 21:43:10 +03:00 by kerem · 2 comments
Owner

Originally created by @RichiCoder1 on GitHub (Apr 25, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/636

Describe feature

Support for the ability specify a command to exec, who's stdout is then read as if it was a .secrets file.

We use a lot of dynamic tools to upsert some special values into GitHub Secrets by reading a special file in the repo. It'd be super helpful to be able to just execute a script as part of the act run like below to dynamically retrieve and populate those secrets.

# .actrc
--secret-exec .github/get_secrets

Alternatives

Just run

.github/get_secrets > .secrets
act
# rm .secrets
Originally created by @RichiCoder1 on GitHub (Apr 25, 2021). Original GitHub issue: https://github.com/nektos/act/issues/636 ## Describe feature Support for the ability specify a command to exec, who's stdout is then read as if it was a `.secrets` file. We use a lot of dynamic tools to upsert some special values into GitHub Secrets by reading a special file in the repo. It'd be super helpful to be able to just execute a script as part of the `act` run like below to dynamically retrieve and populate those secrets. ```bash # .actrc --secret-exec .github/get_secrets ``` #### Alternatives Just run ```bash .github/get_secrets > .secrets act # rm .secrets ```
Author
Owner

@github-actions[bot] commented on GitHub (May 26, 2021):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:848360965 --> @github-actions[bot] commented on GitHub (May 26, 2021): Issue is stale and will be closed in 14 days unless there is new activity
Author
Owner

@catthehacker commented on GitHub (Jun 10, 2021):

sh/bash/zsh:

act -s SOMETHING="$(.github/get_secrets)"

fish:

act -s SOMETHING=(.github/get_secrets)
<!-- gh-comment-id:858585516 --> @catthehacker commented on GitHub (Jun 10, 2021): `sh`/`bash`/`zsh`: ```bash act -s SOMETHING="$(.github/get_secrets)" ``` `fish`: ```fish act -s SOMETHING=(.github/get_secrets) ```
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#416
No description provided.