-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (42 loc) · 1.37 KB
/
web.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
48
49
name: Build and publish Docker image
on:
push:
branches: [ dev ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Load secret files
run: |
echo "$SIGNING_PROPERTIES_PROD" > ./src/mobile/signing.properties.prod
shell: bash
env:
SIGNING_PROPERTIES_PROD: ${{ secrets.SIGNING_PROPERTIES_PROD }}
- name: Build and publish Docker image
run: |
cd ./docker
sh ./build-image.sh
sh ./publish-image-github.sh
sh ./publish-image-heroku.sh
env:
TOKEN_GITHUB: ${{ secrets.TOKEN_GITHUB }}
TOKEN_HEROKU: ${{ secrets.TOKEN_HEROKU }}
- name: Release to Heroku
run: |
heroku container:login
heroku container:release -a heig-pdg web
heroku container:release -a heig-pdg-api web
env:
HEROKU_API_KEY: ${{ secrets.TOKEN_HEROKU }}
- name: Notify on Telegram
run: |
curl -X POST \
--form-string chat_id=${{ secrets.DEPLOY_TELEGRAM_GROUP }} \
--form-string text="✅ New backend on api.tupperdate.me" \
https://api.telegram.org/bot${{ secrets.DEPLOY_TELEGRAM_TOKEN }}/sendMessage