mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #193] .gitignore should be ignored for actions #132
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#132
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 @alanb-sony on GitHub (Apr 14, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/193
I'm trying to use the get-cmake action to download cmake. Strangely it has
distlisted in its .gitignore sodistdoesn't get copied into the docker container and the action fails.@cplee commented on GitHub (Apr 16, 2020):
Looks like it was removed, ok to close this issue now?
https://github.com/lukka/get-cmake/issues/3
@alanb-sony commented on GitHub (Apr 17, 2020):
The get-cmake action has been fixed but in general checking the git-ignore for actions is not necessary and could cause problems like this again in the future
@cplee commented on GitHub (Apr 17, 2020):
Hey @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.
@alanb-sony commented on GitHub (Apr 17, 2020):
doesn't act checkout a clean git copy of each action then copy the action to docker? There shouldn't be any uncommitted files in the host copy as it is never used for anything other than copying to docker?
@cplee commented on GitHub (Apr 17, 2020):
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_modules@cplee commented on GitHub (May 4, 2020):
@alanb-sony - thoughts on comment above? still make sense to consider #198?
@alanb-sony commented on GitHub (May 4, 2020):
I think some change is a good idea, don't know what though. I'm not a go expert (or even a novice)
@wagenet commented on GitHub (May 7, 2020):
@cplee I think it would make sense to only respect
.gitignorefor local actions.@marcaddeo commented on GitHub (May 10, 2020):
This is also causing issues with
actions/cache@v1as it hasdist/in it's.gitignore@cplee commented on GitHub (May 13, 2020):
I like @wagenet idea - only use
.gitignorefor local actions@github-actions[bot] commented on GitHub (Jul 13, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@christopinka commented on GitHub (Sep 11, 2020):
There seems to be a discrepancy between how Github runner behaves vs. an Act runner. I have a go project that is passing in Github and only passes in act if I delete the .gitignore. It leads me to believe that the Github runner is ignoring .gitignore and copying the files that
go testcan't find in Act unless I remove .gitignore. Should behave the same way.@github-actions[bot] commented on GitHub (Nov 11, 2020):
Issue is stale and will be closed in 7 days unless there is new activity
@wagenet commented on GitHub (Nov 12, 2020):
Still should remain open.
@github-actions[bot] commented on GitHub (Feb 19, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@wagenet commented on GitHub (Feb 23, 2021):
There is a PR but it isn’t yet merged.
@github-actions[bot] commented on GitHub (Mar 26, 2021):
Issue is stale and will be closed in 14 days unless there is new activity
@wagenet commented on GitHub (Mar 26, 2021):
I think we still need this.
@jamesmortensen commented on GitHub (Apr 10, 2021):
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.
@miketalley commented on GitHub (Apr 12, 2021):
I'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.@Totktonada commented on GitHub (Apr 19, 2021):
My two coins regarding solution that would be ideal for me.
LT;DR: I would lean on
git ls-filesto create an include-list rather than on.gitignoreto create an exclude-list.The act tool is quite similar to packpack in the following aspect: both copy sources into a docker container and perform some work inside. Both assume that a developer's working tree may be not a clear copy, so just recursive copying is not the option.
The packpack tool runs
git ls-files(for the repository and for its submodules) and creates a tarball with all listed files. The tarball is unpacked inside the container then. Untracked files will not go into the container, however gitignored files that are under git control will go.Another nice property is that I can use
git addto temporarily mark some new files as tracked and verify my build in a container.My experience with this approach is great.