diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 60c90120..3887ee04 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,15 +2,25 @@ variables: GIT_STRATEGY: clone stages: - - generate-readme + - generate-supporting -generate_readme_job: - stage: generate-readme +generate_supporting_files: + stage: generate-supporting image: python:3.10 + before_script: + - apt-get update && apt-get install -y imagemagick script: - pip install --upgrade pip - git checkout main - git status + - mkdir -p icons-small + - | + for icon in icons/*.png; do + small_icon="icons-small/$(basename "$icon")" + if [ ! -f "$small_icon" ]; then + convert "$icon" -resize 16x16 "$small_icon" + fi + done - python scripts/generate_readme.py - export NEEDS_UPDATE="false" - git diff --exit-code || export NEEDS_UPDATE="true" @@ -18,10 +28,10 @@ generate_readme_job: - | if [ $NEEDS_UPDATE = "true" ]; then git remote set-url origin https://$CI_USER:$CI_TOKEN@gitlab.ms-ds.org/msds/icons.git - git add README.md + git add * git config --global user.email "ci@gitlab.ms-ds.org" git config --global user.name "GitLab CI" - git commit -m "Auto-updated README" + git commit -m "Auto-updated small icons + README" git push -o ci.skip origin HEAD:main fi only: diff --git a/openldap.png b/openldap.png deleted file mode 100644 index 98ed5f31..00000000 Binary files a/openldap.png and /dev/null differ