27 lines
831 B
YAML
27 lines
831 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
|
|
#tags: latest
|
|
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
|
|
- ssh -o StrictHostKeyChecking=no hackerbots-live-deploy@hackerbots.net sudo systemctl restart hackerbots-live
|
|
- rm ~/.ssh/id_rsa
|
|
secrets: [deploy_ssh_key]
|