hackerbots-live/.woodpecker.yml

28 lines
881 B
YAML
Raw Permalink Normal View History

2023-02-18 13:11:16 +00:00
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
2023-02-18 13:11:16 +00:00
deploy:
image: docker
2023-02-18 13:11:16 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2023-02-18 13:11:16 +00:00
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]