diff --git a/Dockerfile b/Dockerfile index 04306b5..ccdb097 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM python:latest # Install dependencies. ADD requirements.txt /requirements.txt +ADD main.py /main.py RUN pip install -r requirements.txt CMD python main.py \ No newline at end of file diff --git a/main.py b/main.py index 45b8e55..b698913 100644 --- a/main.py +++ b/main.py @@ -53,5 +53,6 @@ if __name__ == '__main__': stats = getStats() rdmd = decodeReadme(contents.content) newreadme = generatenewReadme(stats=stats, readme=rdmd) - repo.update_file(path=contents.path, message="Updated with Dev Metrics", + if newreadme != rdmd: + repo.update_file(path=contents.path, message="Updated with Dev Metrics", content=newreadme, sha=contents.sha, branch="master")