Commit c69a5bff authored by GridexX's avatar GridexX
Browse files

fix(job_image_scan): triggers only for merge requests



Signed-off-by: default avatarGridexX <arsene582@gmail.com>
parent 3166b7c0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -161,6 +161,9 @@ job_customs:
    - else
    # Retrieve the list of jobs that have been modified in the current branch and keep only the job name
    -   git fetch
    -   if [ -z ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} ]; then
    -     CI_MERGE_REQUEST_TARGET_BRANCH_NAME=${CI_DEFAULT_BRANCH}
    -   fi
    -   JOBS=$(git diff-tree --no-commit-id --name-only -r origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME -r $CI_COMMIT_SHA | tr ' ' '\n' | grep "jobs/.*${JOB_FILES_EXTENSION}$" | tr '\n' ' ' | cut -d'/' -f2)
    - fi
    - for JOB in $JOBS; do