]> Git Repo - esp-hosted.git/commitdiff
ci: Fix sync and deploy to github
authorShivani Tipnis <[email protected]>
Thu, 21 Oct 2021 17:47:38 +0000 (23:17 +0530)
committerShivani Tipnis <[email protected]>
Fri, 22 Oct 2021 13:57:05 +0000 (19:27 +0530)
.gitlab-ci.yml

index 5e4166366d8eaba80ca3d78bc39e6534fb4a4cb6..3f58627cb5a8b11a1910a764d65faec770654d13 100644 (file)
@@ -32,7 +32,7 @@ deploy_master_github:
       - git remote add github [email protected]:espressif/esp-hosted.git
       - git push github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
 
-sync_with_github:
+deploy_force_master_github:
   stage: deploy
   image: $CI_DOCKER_REGISTRY/esp32-ci-env
   tags:
@@ -40,21 +40,14 @@ sync_with_github:
   when: manual
   only:
     - master
-  variables:
-    GITHUB_BRANCH_NAME: "master"
   script:
-      # add ssh key
       - mkdir -p ~/.ssh
       - chmod 700 ~/.ssh
       - echo -n $GH_KEY > ~/.ssh/id_rsa_base64
       - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
       - chmod 600 ~/.ssh/id_rsa
       - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
-      # git add remote
       - git remote remove github &>/dev/null || true
       - git remote add github [email protected]:espressif/esp-hosted.git
-      # sync with github
-      - git config user.email "[email protected]"
-      - git config user.name "Test User"
-      - git pull github ${GITHUB_BRANCH_NAME} --rebase
-      - git push github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
+      - git push -f github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
+
This page took 0.023979 seconds and 4 git commands to generate.