Who would of thought checking a file in to the repo would be so difficult...
If you are running a github action inside a container the version of git needs to match the version of git on the host otherwise the github action will revert to using the git cli to pull down the repository and there will be no .git folder which means any attempts to run git status, git add etc will fail because the folder is not a repo
Latest version of git is not in the apt repo so need to install git from tar source.
Also due to deprecation need to update this logic :
if git diff --exit-code data.csv; then
echo "::set-env name=changes_exist::false"
else
echo "::set-env name=changes_exist::true"
fi
to this to check if files are changed and write a ENV variable like so :
if git diff --exit-code data.csv; then
echo "changes_exist=true" >> $GITHUB_ENV
else
echo "changes_exist=false" >> $GITHUB_ENV
fi
Who would of thought checking a file in to the repo would be so difficult...
If you are running a github action inside a container the version of git needs to match the version of git on the host otherwise the github action will revert to using the git cli to pull down the repository and there will be no
.git
folder which means any attempts to run git status, git add etc will fail because thefolder is not a repo
Latest version of git is not in the apt repo so need to install git from tar source. Also due to deprecation need to update this logic :
to this to check if files are changed and write a ENV variable like so :