Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to clone repo with path name? #3

Open
DaviMenezes opened this issue Apr 26, 2022 · 12 comments
Open

How to clone repo with path name? #3

DaviMenezes opened this issue Apr 26, 2022 · 12 comments
Labels
enhancement New feature or request Waiting for return Waiting for return

Comments

@DaviMenezes
Copy link

git clone .../owner/myrepo MyPath/MyRepo

@GuillaumeFalourd
Copy link
Owner

Hi @DaviMenezes , thank you for opening this issue!
The action currently doesn't support to clone with PATH name, and that would be a great feature indeed! 👍🏼
I'll see how to perform this asap and let you know once it will be implemented.

@GuillaumeFalourd
Copy link
Owner

@DaviMenezes
I've created a v3 branch to test a path-to-clone input field.
Could you try it and give me a feedback? It should work on all 3 OS runners.
Here is a syntax example:

  uses: GuillaumeFalourd/clone-github-repo-action@v3
  with:
    owner: <owner>
    repository: <repo-name>
    path-to-clone: <path/to/clone>

If not informed, the repository will be cloned where the action is used.

@GuillaumeFalourd GuillaumeFalourd added the enhancement New feature or request label May 4, 2022
@GuillaumeFalourd
Copy link
Owner

Hi @DaviMenezes , do you have any feedback?

I've made a test:

Where it seems to work as expected, but I would love to have more returns about the feature.

@shishodiyas
Copy link

If not informed, the repository will be cloned where the action is used.

I'm using this to clone a repo inside an workflow and the path which is provided to it is not used and it is deleting all the exiting files in the repos that was checkout out by the workflow file. instead of cloning the repo

@shishodiyas
Copy link

shishodiyas commented May 30, 2022

why does it delete the content of existing workflow. it is used in my repo for some work how to by pass this deletion
Screenshot (26)
?

@GuillaumeFalourd
Copy link
Owner

GuillaumeFalourd commented May 30, 2022

Hi @satyamshishodiya!

I didn't understand why the action was deleting the repository neither, so I made a few researches and it seems related to a github actions/checkout (which I use to access the repository github.workspace variable if needed) behavior. There is an issue speaking about it here: actions/checkout#211

Are you using containers in your workflow?

I also found this other issue: actions/checkout#430 (comment) where it is suggested to use the input clean: false when calling the actions/checkout, but as it won't work the first time, I would like to see if there is another solution before using this one.

@GuillaumeFalourd GuillaumeFalourd added the Waiting for return Waiting for return label Jun 12, 2022
@shishodiyas
Copy link

There are no containers in my workflow.

@GuillaumeFalourd
Copy link
Owner

Hi @shishodiyas , did you try the other workarounds suggested in the link I shared as well?

@shishodiyas
Copy link

Hi tried various methods this issue is still pending.

@GuillaumeFalourd
Copy link
Owner

For what I can say, it doesn't seem related specifically to the clone operation inside the action, but to the action/checkout. Now, if you want to share the workflow you were using, I can perform more tests to check.

@shishodiyas
Copy link

shishodiyas commented Oct 11, 2022 via email

@GuillaumeFalourd
Copy link
Owner

The workflow file would be enough 👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Waiting for return Waiting for return
Projects
None yet
Development

No branches or pull requests

3 participants