File tree Expand file tree Collapse file tree 1 file changed +2
-29
lines changed Expand file tree Collapse file tree 1 file changed +2
-29
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,14 @@ before_script:
13
13
- chmod 600 ~/.ssh/id_rsa
14
14
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
15
15
16
- deploy_test_github :
16
+ deploy_master_github :
17
17
stage : deploy
18
18
image : $CI_DOCKER_REGISTRY/esp32-ci-env
19
19
tags :
20
20
- deploy
21
21
when : manual
22
22
only :
23
23
- master
24
- variables :
25
- TEST_BRANCH : " test"
26
24
script :
27
25
- mkdir -p ~/.ssh
28
26
- chmod 700 ~/.ssh
@@ -32,29 +30,4 @@ deploy_test_github:
32
30
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
33
31
- git remote remove github &>/dev/null || true
34
32
-
git remote add github [email protected] :espressif/esp-hosted.git
35
- # Using test branch
36
- - git branch ${TEST_BRANCH} 2>&1 || echo "Branch exists" && git branch -D ${TEST_BRANCH} 2>&1 || echo "Branch deleted" && git branch ${TEST_BRANCH} 2>&1 && echo "Branch created"
37
- - git push github "${CI_COMMIT_SHA}:refs/heads/${TEST_BRANCH}"
38
-
39
- .deploy_master_github :
40
- stage : deploy
41
- image : $CI_DOCKER_REGISTRY/esp32-ci-env
42
- tags :
43
- - deploy
44
- when : manual
45
- only :
46
- - master
47
- variables :
48
- MASTER_BRANCH : $CI_COMMIT_REF_NAME
49
- script :
50
- - mkdir -p ~/.ssh
51
- - chmod 700 ~/.ssh
52
- - echo -n $GH_KEY > ~/.ssh/id_rsa_base64
53
- - base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
54
- - chmod 600 ~/.ssh/id_rsa
55
- - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
56
- - git remote remove github &>/dev/null || true
57
- -
git remote add github [email protected] :espressif/esp-hosted.git
58
- # Using master branch
59
- # - git push github "${CI_COMMIT_SHA}:refs/heads/${MASTER_BRANCH}"
60
-
33
+ - git push github "${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
You can’t perform that action at this time.
0 commit comments