mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #784] Provide option to disable loading .env file by default #492
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#492
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nenadfilipovic on GitHub (Aug 22, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/784
System information
act: /actversion: 0.2.24Expected behaviour
Please provide a way to disable loading .env file as default.
Actual behaviour
Act loads
.envfile as default, my workflow does not use environment vars, it uses only secrets. I was banging my head whole day why my workflow does not fail even when I comment out environment object inside workflow. My app needs these values and with those values commented out my app would still build and that would never happen inside GitHub actions workflow, it would fail every time.Example:
This would work perfectly fine and when pushed to GitHub CI it would fail.
Workflow and/or repository
/
Steps to reproduce
Provide environment for whole workflow and hydrate it from secrets, when executed act will load
.envand you will get fake impression that everything works and your app wont ask for other environment vars.I provided
--env-file .fake.envinside .actrc to prevent it from loading my .env file.In this configuration I get these warnings and that would never happen if I let act load .env file:
actoutput/
@catthehacker commented on GitHub (Aug 22, 2021):
act --env-file=""