hackerbots-live/.woodpecker.yml

28 lines
881 B
YAML

pipeline:
build:
image: plugins/docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
settings:
registry: gitea.malloc.hackerbots.net
repo: gitea.malloc.hackerbots.net/tdfischer/hackerbots-live
daemon_off: true
auto_tag: true
username:
from_secret: GITEA_USERNAME
password:
from_secret: GITEA_PASSWORD
deploy:
image: docker
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- docker pull gitea.malloc.hackerbots.net/tdfischer/hackerbots-live:latest
- mkdir -p ~/.ssh/
- echo "$DEPLOY_SSH_KEY" > ~/.ssh/id_rsa
- chmod a-rwx,u+r ~/.ssh/id_rsa
- chmod a-rwx,u+rx ~/.ssh/
- ssh -o StrictHostKeyChecking=no hackerbots-live-deploy@hackerbots.net sudo systemctl restart hackerbots-live
- rm ~/.ssh/id_rsa
secrets: [deploy_ssh_key]