Commit 898275e7 authored by Cédric OLIVIER's avatar Cédric OLIVIER Committed by Pierre Smeyers
Browse files

fix(ci): only launch production plan when merge request targets the prod branch

parent e65b69b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -957,8 +957,8 @@ tf-plan-production:
    # exclude if $TF_PROD_PLAN_ENABLED not set
    - if: '$TF_PROD_PLAN_ENABLED != "true"'
      when: never
    # enabled on merge requests
    - if: $CI_MERGE_REQUEST_ID
    # enabled on merge requests targeting prod branch
    - if: '$CI_MERGE_REQUEST_ID && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME =~ $PROD_REF'
    # enabled on production branches
    - if: '$CI_COMMIT_REF_NAME =~ $PROD_REF'