Files
icons/.gitlab-ci.yml
2023-09-21 03:49:47 +02:00

27 lines
707 B
YAML

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 scripts/generate_readme.py
- export NEEDS_UPDATE="false"
- git diff --exit-code || export NEEDS_UPDATE="true"
- git config --global user.email "ci@gitlab.ms-ds.org"
- git config --global user.name "GitLab CI"
- |
if [ $NEEDS_UPDATE = "true" ]; then
git add README.md
git commit -m "Auto-updated README"
git push origin main
fi
only:
- main