act: .gitignore should be ignored for actions
I’m trying to use the get-cmake action to download cmake. Strangely it has dist
listed in its .gitignore so dist
doesn’t get copied into the docker container and the action fails.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (12 by maintainers)
This is also causing issues with
actions/cache@v1
as it hasdist/
in it’s.gitignore
I’m having an issue because
.env
is included in the.gitignore
for the project. When runningact
the environment variables within.env
are not getting loaded. Commenting out the.env
line in.gitignore
and runningact
seems to resolve the issue, but that means the.env
would be committed to source control. ☹️Having to change this each time that I run
act
is not great. A flag to ignore the.gitignore
would be ideal and solve this issue.One of the use cases for using act to run workflows is to iterate and debug parts of them more quickly. If I want to fix a problem in the workflow, I don’t necessarily need to do a fresh checkout of my codebase each time. Also, I can run workflows against uncommitted changes to decide whether or not I’m ready to commit. This allows me to move faster.
Some flag to be able to ignore the .gitignore would be awesome.
Still should remain open.
It does…unless you are using a local action, stored in the same repo as your workflow with something like
uses: ./.github/my-local-action
In that case, you would want any
.gitignore
to kick in to ensure you don’t copy in files likenode_modules
I like @wagenet idea - only use
.gitignore
for local actionsHey @alanb-sony - thanks for the PR! I need some help though understanding the scenario. Why wouldn’t you want a .gitignore to be used within the action? I’m thinking of node_modules for example.
This seems like a bug with the cmake action in which there was a bad gitignore that needed to be fixed.