Only do ssh keys on master
Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
@@ -21,13 +21,17 @@ steps:
|
|||||||
- echo "$SSH_KEY" > /root/.ssh/id_ed25519
|
- echo "$SSH_KEY" > /root/.ssh/id_ed25519
|
||||||
- chmod 600 /root/.ssh/id_ed25519
|
- chmod 600 /root/.ssh/id_ed25519
|
||||||
- ssh-keyscan -p 4422 vps.noahknegt.com > /root/.ssh/known_hosts
|
- ssh-keyscan -p 4422 vps.noahknegt.com > /root/.ssh/known_hosts
|
||||||
- ssh -p 4422 noahk@vps.noahknegt.com "echo 'SSH connection established'"
|
|
||||||
environment:
|
environment:
|
||||||
SSH_KEY:
|
SSH_KEY:
|
||||||
from_secret: ssh_key
|
from_secret: ssh_key
|
||||||
volumes:
|
volumes:
|
||||||
- name: ssh_key
|
- name: ssh_key
|
||||||
path: /root/.ssh
|
path: /root/.ssh
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
- name: ansible apply
|
- name: ansible apply
|
||||||
image: cytopia/ansible:latest-tools
|
image: cytopia/ansible:latest-tools
|
||||||
|
Reference in New Issue
Block a user