Compare commits
4 commits
a0052b2e6a
...
bca529e46d
Author | SHA1 | Date | |
---|---|---|---|
bca529e46d | |||
cd9ef12239 | |||
113b5e1435 | |||
5aeebeca67 |
1 changed files with 12 additions and 4 deletions
16
.drone.yml
16
.drone.yml
|
@ -44,8 +44,11 @@ steps:
|
||||||
SSH_PRIVATE_KEY:
|
SSH_PRIVATE_KEY:
|
||||||
from_secret: SSH_PRIVATE_KEY
|
from_secret: SSH_PRIVATE_KEY
|
||||||
commands:
|
commands:
|
||||||
- echo $SSH_USER
|
- export $SSH_TARGET="$SSH_USER@$SSH_HOST"
|
||||||
- echo $SSH_HOST
|
- set -x
|
||||||
|
- echo "$SSH_TARGET"
|
||||||
|
- echo $SSH_USER | wc -c
|
||||||
|
- echo $SSH_HOST | wc -c
|
||||||
- echo $SSH_PRIVATE_KEY
|
- echo $SSH_PRIVATE_KEY
|
||||||
- apk update && apk add openssh-client
|
- apk update && apk add openssh-client
|
||||||
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
||||||
|
@ -53,8 +56,13 @@ steps:
|
||||||
- chmod 600 ~/.ssh/deploy_key
|
- chmod 600 ~/.ssh/deploy_key
|
||||||
- ssh-keygen -f ~/.ssh/deploy_key -y > ~/.ssh/deploy_key.pub
|
- ssh-keygen -f ~/.ssh/deploy_key -y > ~/.ssh/deploy_key.pub
|
||||||
- "cat ~/.ssh/deploy_key.pub | cut -f3 -d' '"
|
- "cat ~/.ssh/deploy_key.pub | cut -f3 -d' '"
|
||||||
- ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key "${SSH_USER}@${SSH_HOST}" ps:stop social
|
- ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key $SSH_TARGET ps:stop social
|
||||||
- ssh -o StrictHostKeyChecking=no -i ~/.ssh/deploy_key "${SSH_USER}@${SSH_HOST}" git:from-image social "glenux/service-gotosocial:${DRONE_BRANCH/\\//-}_${DRONE_COMMIT_SHA:0:8}"
|
- ssh -o StrictHostKeyChecking=no
|
||||||
|
-i ~/.ssh/deploy_key
|
||||||
|
$SSH_USER@$SSH_HOST
|
||||||
|
git:from-image social
|
||||||
|
"glenux/service-gotosocial:${DRONE_BRANCH/\\//-}_${DRONE_COMMIT_SHA:0:8}"
|
||||||
|
#
|
||||||
- echo "SUCCESS"
|
- echo "SUCCESS"
|
||||||
|
|
||||||
# volumes:
|
# volumes:
|
||||||
|
|
Loading…
Add table
Reference in a new issue