How do secrets work
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
3e90f780aa
commit
9336875427
1 changed files with 2 additions and 1 deletions
|
@ -8,11 +8,12 @@ pipeline:
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- apk add rsync openssh
|
- apk add rsync openssh
|
||||||
- echo "$SSH_SECRET_KEY" > SSH_SECRET_KEY
|
- echo "$${SSH_SECRET_KEY}" > SSH_SECRET_KEY
|
||||||
- chmod 600 SSH_SECRET_KEY
|
- chmod 600 SSH_SECRET_KEY
|
||||||
- head -n 1 SSH_SECRET_KEY
|
- head -n 1 SSH_SECRET_KEY
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
|
- echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzBZ+QmM4EO3Fwc1ZcvWV2IY9VF04T0H9brorGj9Udp" >> ~/.ssh/known_hosts
|
||||||
- rsync -azvrP -e "ssh -i SSH_SECRET_KEY" public/ sourcehutBuilds@mzhang.io:/mnt/storage/svcdata/blog-public
|
- rsync -azvrP -e "ssh -i SSH_SECRET_KEY" public/ sourcehutBuilds@mzhang.io:/mnt/storage/svcdata/blog-public
|
||||||
|
secrets: [ SSH_SECRET_KEY ]
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
|
|
Loading…
Reference in a new issue