git-ftp-action icon indicating copy to clipboard operation
git-ftp-action copied to clipboard

Why only compatible with v1 of actions/checkout?

Open dboulet opened this issue 5 years ago • 2 comments
trafficstars

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?

dboulet avatar Sep 15 '20 05:09 dboulet

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.

sebastianpopp avatar Sep 15 '20 09:09 sebastianpopp

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.

dboulet avatar Sep 16 '20 03:09 dboulet