Skip to content
Snippets Groups Projects
Commit 7b2c5103 authored by Joost Hemmen's avatar Joost Hemmen :basketball:
Browse files

rework job rules

parent ea4f95e3
No related branches found
No related tags found
1 merge request!243Resolve "Document CVEs of images used in docker compose setup"
Pipeline #486868 canceled
......@@ -25,14 +25,10 @@ docker-image-scan:
- "*.cve"
expire_in: 30 days
rules:
# This will ensure the job only runs on pushes to the `main` branch (not MRs or other branches)
- if: '$CI_COMMIT_BRANCH == "main" && $CI_PIPELINE_SOURCE == "push"'
# Run only when a merge request is merged into the `main` branch
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" && $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_EVENT_TYPE == "merged"'
when: always
# This will prevent the job from running for any branch other than `main`
- if: '$CI_COMMIT_BRANCH != "main"'
when: never
# This ensures that the job does not run if triggered by a merge request pipeline
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
# Prevent the job from running in all other cases
- when: never
tags:
- "dind"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment