Skip to content

Commit 4f20f28

Browse files
committed
Add updating the github mirror as a deployment task.
1 parent 6cc6a48 commit 4f20f28

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

Diff for: .gitlab-ci.yml

+23-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1+
image: python:3
2+
3+
variables:
4+
GITHUB_PUBLIC_KEY: "github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=="
5+
16
tests:
27
before_script:
3-
- "apt install python3-pip"
48
- "pip install -q -r requirements.txt"
59

610
script:
711
- "nosetests"
12+
13+
update-github-mirror:
14+
stage: deploy
15+
16+
before_script:
17+
- eval $(ssh-agent -s)
18+
- ssh-add <(echo "$GITHUB_MIRROR_DEPLOY_KEY")
19+
20+
only:
21+
- master
22+
23+
script:
24+
- mkdir -p ~/.ssh
25+
- touch ~/.ssh/known_hosts
26+
- grep -q "$GITHUB_PUBLIC_KEY" ~/.ssh/known_hosts || echo "$GITHUB_PUBLIC_KEY" >> ~/.ssh/known_hosts
27+
- git push [email protected]:rereadgames/unity-hooks.git $CI_BUILD_REF:master
28+
29+
when: always

0 commit comments

Comments
 (0)