[GH-ISSUE #2129] automatically detect .env file in directory #1014

Closed
opened 2026-03-01 21:48:12 +03:00 by kerem · 6 comments
Owner

Originally created by @Glydric on GitHub (Dec 16, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/2129

Act version

0.2.55

Feature description

It will be good it it automatically detects the env file in current directory and loads it

Originally created by @Glydric on GitHub (Dec 16, 2023). Original GitHub issue: https://github.com/nektos/act/issues/2129 ### Act version 0.2.55 ### Feature description It will be good it it automatically detects the env file in current directory and loads it
kerem 2026-03-01 21:48:12 +03:00
Author
Owner

@weyert commented on GitHub (Dec 17, 2023):

Is this normal behaviour of Github Actions?

If not, I think it's better to use some special named .env for act to avoid unexpected behaviour when writing workflows.

<!-- gh-comment-id:1858998814 --> @weyert commented on GitHub (Dec 17, 2023): Is this normal behaviour of Github Actions? If not, I think it's better to use some special named `.env` for `act` to avoid unexpected behaviour when writing workflows.
Author
Owner

@Glydric commented on GitHub (Dec 17, 2023):

Well, using a special name is also a good idea, I don't think GitHub actions do this as pushing .env files is of course a bad decision. But for local development it could be a good feature i guess

<!-- gh-comment-id:1859079556 --> @Glydric commented on GitHub (Dec 17, 2023): Well, using a special name is also a good idea, I don't think GitHub actions do this as pushing .env files is of course a bad decision. But for local development it could be a good feature i guess
Author
Owner

@ChristopherHX commented on GitHub (Dec 17, 2023):

Loading the file .env is default behavior and is working for me.

Is this issue that it somehow doesn't work for you?

<!-- gh-comment-id:1859286435 --> @ChristopherHX commented on GitHub (Dec 17, 2023): Loading the file `.env` is default behavior and is working for me. Is this issue that it somehow doesn't work for you?
Author
Owner

@ChristopherHX commented on GitHub (Dec 17, 2023):

Obviously if you want to use secrets instead of env the name is .secrets by default.

<!-- gh-comment-id:1859286844 --> @ChristopherHX commented on GitHub (Dec 17, 2023): Obviously if you want to use secrets instead of env the name is `.secrets` by default.
Author
Owner

@Glydric commented on GitHub (Dec 17, 2023):

@ChristopherHX Yes, the .secret file is automatically detected. Good

<!-- gh-comment-id:1859294407 --> @Glydric commented on GitHub (Dec 17, 2023): @ChristopherHX Yes, the .secret file is automatically detected. Good
Author
Owner

@ChristopherHX commented on GitHub (Sep 26, 2024):

not planned, since working as designed

<!-- gh-comment-id:2377845203 --> @ChristopherHX commented on GitHub (Sep 26, 2024): not planned, since working as designed
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#1014
No description provided.