Added auto update for readme

This commit is contained in:
2023-09-21 03:17:04 +02:00
parent 74f13c99d9
commit 32cd98e278

25
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,25 @@
stages:
- generate-readme
generate_readme_job:
stage: generate-readme
image: python:3.10
script:
- pip install --upgrade pip
- |
if [[ $(git log -1 --pretty=%B) == "Auto-updated README" ]]; then
echo "Skipping job for automated commit."
exit 0
fi
- python script/generate_readme.py
- git diff --exit-code || echo "Changes detected!"
- git config --global user.email "ci@gitlab.ms-ds.org"
- git config --global user.name "GitLab CI"
- |
if ! git diff --cached --quiet; then
git add README.md
git commit -m "Auto-updated README"
git push origin main
fi
only:
- main