I have one git repository on github. The scenario is like this : In this repository, there is one folder called files
. My collaborators very frequently make changes to this directory. I also have Dockerfile
in this repo. I only want to build the docker image again if anything outside of files
folder change. If not, I want to use the prebuilt docker image. This building and using docker images is done in Jenkins. Since directory files
is changed very frequently, I don't want to build my docker image every time this directory changes.
How can I determine if in any commit, the changed files are in this directory or not?
Currently, I use a pygithub script, to make API calls to github, however, this is very slow, and also I have the repository already checked out. I wanted to know if I can achieve this using git commands. If so, this could be done very fast.