git-ftp-action
git-ftp-action copied to clipboard
Why only compatible with v1 of actions/checkout?
This project’s README contains a warning that this project is only compatible with v1 of actions/checkout. Could you please clarify: why is this the case, and what would need to be changed to make this action compatible with v2?
git-ftp needs the full git history in order to work. actions/checkout@v2 by default only gets the latest commit. It might help to set the fetch-depth option to 0 to get the full history, but I just haven't gotten around to testing it, yet.
Thanks, @sebastianpopp. Yes, setting a fetch-depth of 0 with actions/checkout@v2 will fetch the entire Git history, and should solve the issue. On my project, I’ve been using git-ftp-action and actions/checkout@v2 with a fetch-depth of 10, with success. As long as I never create more than 10 commits between deploys, it works perfectly. I recommend using a limited fetch-depth, since it will be more performant than having to fetch the entire history every time, especially for repos with a large Git history.