mirror of
https://github.com/nektos/act.git
synced 2026-04-26 09:25:54 +03:00
[GH-ISSUE #517] ACT does not pick .env file #349
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#349
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 (Feb 3, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/517
As the title say, act just wont use my .env file, when I create .secrets file it works well.
This is how I run it:
act pull_request -P ubuntu-latest=lucasalt/act_base:latest, env is just basic valid env file.Maybe it is problem with my workflow file, this is how I get env vars for CI:
This is valid for github actions I dont know maybe ACT is picking my env file but I dont use vars correctly?
This is how I use env vars for docker-compose:
@catthehacker commented on GitHub (Feb 3, 2021):
Please provide workflow and
.envfile..envfile structure is described in https://github.com/nektos/act#configuration and has to be used via${{ env.VAR }}context.@nenadfilipovic commented on GitHub (Feb 3, 2021):
If I change in workflow from secrets.VAR to env.VAR it still doesn't work.
@nenadfilipovic commented on GitHub (Feb 4, 2021):
@catthehacker
Ok I did some thinkering and this is result:
If I comment out this part:
Everything is working ok and I can echo env vars from steps. Problem is without that commented part how am I going to get CI vars for workflow, my .env is ignored in git... Maybe only solution is to use .secrets file.
@nenadfilipovic commented on GitHub (Feb 5, 2021):
Fixed with
--secret-file .envin .actrc file. This way I can use .env in local and I can use secrets when running on real github runner.@catthehacker commented on GitHub (Feb 5, 2021):
Well, the main issue is that currently
env:keys are not interpolated injobs:andsteps:which I'm working on fixing that, onlyenv:beforejobs:will work