Only lint config in merge requests

This commit is contained in:
Jochen Sprickerhof 2024-09-24 13:39:56 +02:00 committed by Jochen Sprickerhof
parent 1c0c36c6b1
commit c5a7bde042

View file

@ -178,13 +178,22 @@ fdroid lint config:
- export fdroidserver=$CI_PROJECT_DIR/fdroidserver
- *install_fdroid_server
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_PIPELINE_SOURCE == "push"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
paths:
- .gitlab-ci.yml
- config.yml
- config/*.yml
- config/*/*.yml
# only check pushes to fdroids own repo
- if: $CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_PATH == "fdroid/fdroiddata"
changes:
compare_to: 'refs/heads/master'
paths:
- .gitlab-ci.yml
- config.yml
- config/*.yml
- config/*/*.yml
script:
- fdroid lint config/*.yml config/*/*.yml
# TODO once config.yml is added to fdroiddata, add it to the line above