Commit 0412cf5b authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Protection of branch only run for merge requests

parent 02e33bdf
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -63,6 +63,8 @@ Word CR text:
Protect branch:
  stage: generation
  when: on_success
  only:
    - merge_requests
  script:
    - |
     curl --request POST --header "PRIVATE-TOKEN: ${ACCESS_TOKEN}" "${CI_API_V4_URL}/projects/${CI_MERGE_REQUEST_PROJECT_ID}/protected_branches?name=${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}&merge_access_level=30"
@@ -89,7 +91,7 @@ Publish spec:
  artifacts:
    name: "${SPEC_NAME}_${CI_COMMIT_TAG}"
    paths:
      - "${SPEC_NAME}_${CI_COMMIT_TAG}.docx"
      - ${SPEC_NAME}_${CI_COMMIT_TAG}.docx

pages:
  stage: web