fix(gitlab_yaml_lint): adjust logic to detect changes

!42
This commit is contained in:
2023-06-02 15:54:03 +09:30
parent 6accd8633c
commit efa6271057

View File

@ -68,22 +68,17 @@
$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_BRANCH == "master" &&
$CI_PIPELINE_SOURCE == "push" $CI_PIPELINE_SOURCE == "push"
exists: exists:
#- '{!gitlab-ci/**, !website-template/**, **}/*gitlab-ci*' - '{*, **/**, **}/*gitlab-ci*'
- '{*, **/}*gitlab-ci*'
# - ".gitlab-ci*"
# - "**/*gitlab-ci*"
when: always when: always
- if: # condition_dev_branch_push - if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" && $CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push" $CI_PIPELINE_SOURCE == "push"
exists: exists:
#- '{!gitlab-ci/**, !website-template/**, **}/*gitlab-ci*' - '{*, **/**, **}/*gitlab-ci*'
- '{*, **/}*gitlab-ci*'
changes: changes:
paths: paths:
#- '{!gitlab-ci/**, !website-template/**, **}/*gitlab-ci*' - '{*, **/**, **}/*gitlab-ci*'
- '{*, **/}*gitlab-ci*'
compare_to: 'master' compare_to: 'master'
when: always when: always
@ -92,16 +87,10 @@
$CI_COMMIT_BRANCH != "development" && $CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push" $CI_PIPELINE_SOURCE == "push"
exists: exists:
#- '{!gitlab-ci/**, !website-template/**, **}/*gitlab-ci*yml' - '{*, **/**, **}/*gitlab-ci*'
#- '{*, a}/*gitlab-ci*yml' # worked
#- '{!website-template/**, *, **, **/**}gitlab-ci*'
#- '{*, **, **/**, !website-template/**}/*gitlab-c*' worked
- '{*, **/}*gitlab-ci*'
changes: changes:
paths: paths:
- '{*, **/}*gitlab-ci*' - '{*, **/**, **}/*gitlab-ci*'
# - ".gitlab-ci*"
# - "**/*gitlab-ci*"
compare_to: 'development' compare_to: 'development'
when: always when: always