[GH-ISSUE #58] Supply secrets with a .env file #31

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

Originally created by @Djiit on GitHub (Apr 17, 2019).
Original GitHub issue: https://github.com/nektos/act/issues/58

It would be great to be able to provide some sort of .env file to avoid prompting user each time you run a workflow.

Originally created by @Djiit on GitHub (Apr 17, 2019). Original GitHub issue: https://github.com/nektos/act/issues/58 It would be great to be able to provide some sort of `.env` file to avoid prompting user each time you run a workflow.
kerem closed this issue 2026-03-01 21:39:16 +03:00
Author
Owner

@Haegin commented on GitHub (Apr 25, 2019):

If the secret vars are in the current environment it seems that act uses them automatically. I moved from using .env files to using direnv a while back as that loads environment vars into the environment automatically when you cd into a directory and unloads them when you leave. Because the env vars are in the environment tools then don't need to support a .env file, they just need to support reading environment vars which every language I've used can do natively.

<!-- gh-comment-id:486778591 --> @Haegin commented on GitHub (Apr 25, 2019): If the secret vars are in the current environment it seems that `act` uses them automatically. I moved from using `.env` files to using `direnv` a while back as that loads environment vars into the environment automatically when you `cd` into a directory and unloads them when you leave. Because the env vars are in the environment tools then don't need to support a `.env` file, they just need to support reading environment vars which every language I've used can do natively.
Author
Owner

@maxheld83 commented on GitHub (May 20, 2019):

I've documented this in a PR: https://github.com/nektos/act/pull/66

<!-- gh-comment-id:494092038 --> @maxheld83 commented on GitHub (May 20, 2019): I've documented this in a PR: https://github.com/nektos/act/pull/66
Author
Owner

@cplee commented on GitHub (Feb 25, 2020):

Support is now available to provide default vals via .actrc

<!-- gh-comment-id:590715466 --> @cplee commented on GitHub (Feb 25, 2020): Support is now available to provide default vals via [.actrc](https://github.com/nektos/act#configuration)
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#31
No description provided.