-
Notifications
You must be signed in to change notification settings - Fork 198
Description
Hi,
This is a feature request and not a bug report.
GitHub Actions has two types of behavior depending on the version of git
available with version 2.18 being the breaking point. Ubuntu 18.04 official supports git
version 2.17.1 (through apt-get
) but it's possible to compile a newer git
version on it. I'm using the Bioconductor docker images based on Rocker 4.0 for Ubuntu 18.04 on GitHub Action workflow checks. It takes ~3 minutes to compile a newer version of git
, but well, maybe you would consider adding a newer version of git
on your Rocker images if you think that this is request that would help others (maybe even yourselves if you use Rocker images with GHA).
Details
https://github.com/actions/checkout has two versions (v1
and v2
). v2
is the one recommended by r-lib/actions
with reasons highlighted at r-lib/actions#50. As noted at https://github.com/actions/checkout#checkout-v2 and reported in issues like actions/checkout#238, actions/checkout@v2
does not clone a git repo unless the git
version is 2.18 or newer. Without a working local clone, you can't run commands like pkgdown::deploy_to_branch()
or other code that relies on having a working git clone. By adapting https://www.digitalocean.com/community/tutorials/how-to-install-git-on-ubuntu-18-04 I was able to compile git
2.26.2 (latest stable release) as shown at https://github.com/lcolladotor/biocthis/blob/master/actions/check-bioc.yml#L117-L130. That is:
sudo apt-get update -y
sudo apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip -y
wget https://github.com/git/git/archive/v2.26.2.zip -O git.zip
unzip git.zip
cd git-*
make prefix=/usr all
sudo make prefix=/usr install
cd -
git --version
If you think that installing git
2.18 or newer is of interest, I can try to send a PR with the above code, though I'm not 100% sure which file(s) it would need to live at.
Of course, I also understand that you might want to keep the installed software restricted to apt-get
and avoid compiling if possible (that was what Bioconductor decided regarding their images). Ultimately, I can use the docker images inherited from Rocker without issues (~3 minutes is not much given the generous time limits provided by GitHub Actions system for open source software).
Best,
Leo