|
@@ -0,0 +1,38 @@
|
|
1
|
+name: deploy
|
|
2
|
+on:
|
|
3
|
+ push:
|
|
4
|
+ tags:
|
|
5
|
+ - v*
|
|
6
|
+
|
|
7
|
+jobs:
|
|
8
|
+ build:
|
|
9
|
+ name: deploy
|
|
10
|
+ runs-on: ubuntu-latest
|
|
11
|
+ steps:
|
|
12
|
+ - uses: actions/checkout@v2
|
|
13
|
+ with:
|
|
14
|
+ fetch-depth: 0
|
|
15
|
+ - name: Dokku
|
|
16
|
+ uses: dokku/github-action@9c1a871eab9daef563cf08b9602c7675f4a8bb56
|
|
17
|
+ with:
|
|
18
|
+ git_remote_url: ssh://dokku@${{ secrets.SSH_SERVER }}:22/wbo
|
|
19
|
+ ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
20
|
+ git_push_flags: --force
|
|
21
|
+ push_to_registry:
|
|
22
|
+ name: Push Docker image to Docker Hub
|
|
23
|
+ runs-on: ubuntu-latest
|
|
24
|
+ steps:
|
|
25
|
+ - name: Check out the repo
|
|
26
|
+ uses: actions/checkout@v2
|
|
27
|
+ - name: Set env
|
|
28
|
+ run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
|
29
|
+ - name: Log in to Docker Hub
|
|
30
|
+ uses: docker/login-action@v1
|
|
31
|
+ with:
|
|
32
|
+ username: lovasoa
|
|
33
|
+ password: ${{ secrets.DOCKER_PASSWORD }}
|
|
34
|
+ - name: Push to Docker Hub
|
|
35
|
+ uses: docker/build-push-action@v2
|
|
36
|
+ with:
|
|
37
|
+ push: true
|
|
38
|
+ tags: lovasoa/wbo:latest,lovasoa/wbo:${{ env.RELEASE_VERSION }}
|