29 lines
681 B
YAML
29 lines
681 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: hcloud
|
|
|
|
steps:
|
|
- name: check requirements
|
|
image: alpine
|
|
commands:
|
|
- |
|
|
[ -z "$SERVER_ID" ] && false
|
|
|
|
- name: get hcloud
|
|
image: alpine
|
|
commands:
|
|
- apk add -U curl
|
|
- curl -L https://github.com/hetznercloud/cli/releases/latest/download/hcloud-linux-amd64.tar.gz | tar zx
|
|
|
|
- name: hcloud
|
|
image: alpine
|
|
environment:
|
|
HCLOUD_TOKEN:
|
|
from_secret: hcloud_token
|
|
commands:
|
|
# - apk add openssh
|
|
- echo $SERVER_ID
|
|
# - ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -q -N ''
|
|
# - ./hcloud ssh-key create --name drone --public-key-from-file /root/.ssh/id_ed25519.pub
|
|
# - ./hcloud server list
|
|
# - ./hcloud ssh-key delete drone |