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@v1as it hasdist/in it’s.gitignoreI’m having an issue because
.envis included in the.gitignorefor the project. When runningactthe environment variables within.envare not getting loaded. Commenting out the.envline in.gitignoreand runningactseems to resolve the issue, but that means the.envwould be committed to source control. ☹️Having to change this each time that I run
actis not great. A flag to ignore the.gitignorewould 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-actionIn that case, you would want any
.gitignoreto kick in to ensure you don’t copy in files likenode_modulesI like @wagenet idea - only use
.gitignorefor 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.