-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (33 loc) · 1.04 KB
/
deploy_latest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
name: Deploy latest
on:
push:
branches: [ master ]
jobs:
deploy_latest:
name: Deploy latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login docker
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: make docker-login-ci
- name: Set version
run: echo ${{ github.sha }} > version.txt
- name: Release image
run: make docker-release-latest
- name: Deploy to swarm
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DOCKER_SWARM_SSH_HOST }}
username: hakeshonassy
key: ${{ secrets.DOCKER_SWARM_SSH_PRIVATE_KEY }}
port: ${{ secrets.DOCKER_SWARM_SSH_PORT }}
script: >
docker service update
--image kirillbobykin/hakeshonassybot:`echo ${{ github.sha }} | cut -c1-7`
hakeshonassybot_bot;
docker service update
--image kirillbobykin/hakeshonassybot:`echo ${{ github.sha }} | cut -c1-7`
hakeshonassybot_api