-
Notifications
You must be signed in to change notification settings - Fork 22
48 lines (42 loc) · 1.42 KB
/
gradlew-publish-and-deploy-tests.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
36
37
38
39
40
41
42
43
44
45
46
47
name: Deploy tests
on:
push:
branches:
- test
jobs:
publish-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: romanew/invest:latest-tests
username: ${{ secrets.DOCKER_PUBLISH_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_PUBLISH_REGISTRY_PASSWORD }}
dockerfile: Dockerfile.Tests
deploy-tests:
needs: publish-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Copy docker-compose-tests.yml
uses: garygrossgarten/github-action-scp@release
with:
local: docker-compose-tests.yml
remote: ./tinkoff-invest-robot/docker-compose-tests.yml
host: 31.186.136.15
username: root
privateKey: ${{ secrets.SSH_PRIVATE_KEY_PERSONAL }}
- name: Start using docker-compose
uses: appleboy/ssh-action@master
with:
host: 31.186.136.15
username: root
key: ${{ secrets.SSH_PRIVATE_KEY_PERSONAL }}
script: |
cd tinkoff-invest-robot
export TINKOFF_TOKEN_SANDBOX=${{ secrets.TINKOFF_TOKEN_SANDBOX }}
docker-compose -f docker-compose-tests.yml down
docker-compose -f docker-compose-tests.yml pull
docker-compose -f docker-compose-tests.yml up -d