-
Notifications
You must be signed in to change notification settings - Fork 26
114 lines (105 loc) · 4.13 KB
/
push-master-environment.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Build images from latest master branch
on:
push:
tags:
- v*
jobs:
create-master-image:
runs-on: ubuntu-latest
environment: master
steps:
- name: Checkout Repo
uses: actions/[email protected]
- name: Setup Docker
uses: docker-practice/[email protected]
- name: Log in to docker registry
run: |
echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login \
--username ${{ secrets.DOCKER_HUB_USER }} \
--password-stdin
- name: Install node module dependencies
run: |
cd hapi
yarn
cd ../webapp
yarn
cd ../..
- name: Build new images and push
run: |
make \
build-docker-images \
push-docker-images
env:
# general
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
BRANCH: production
NAMESPACE: mainnet-eosrate
# webapp
REACT_APP_VERSION: ${{ github.ref }}
REACT_APP_RATING_CONTRACT: rateproducer
REACT_APP_MAINNET_VERSION: true
REACT_APP_EDEN_CONTRACT: genesis.eden
REACT_APP_GRAPHQL_HTTP_URL: https://graphql.eosrate.io/v1/graphql
REACT_APP_GRAPHQL_WS_URL: wss://graphql.eosrate.io/v1/graphql
REACT_APP_EOS_API_URL: https://api.main.alohaeos.com
REACT_APP_EOS_API_HOST: api.main.alohaeos.com
REACT_APP_EOS_API_PORT: 443
REACT_APP_EOS_API_PROTOCOL: https
REACT_APP_EOS_CHAIN_ID: aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906
REACT_APP_BLOCK_EXPLORER: https://bloks.io
REACT_APP_NETWORK_MONITOR_URL: https://mainnet.eosio.online/
- name: Build kubernetes files
id: build_kubernetes_files
run: |
make \
build-kubernetes
env:
# general
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
BRANCH: production
NAMESPACE: mainnet-eosrate
INGRESS_HOST: eosrate.io
INGRESS_GRAPHQL_HOST: graphql.eosrate.io
# postgres
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
# hapi
HAPI_SERVER_ADDRESS: 0.0.0.0
HAPI_SERVER_PORT: 9090
HAPI_VALID_USERS: ${{ secrets.HAPI_VALID_USERS }}
HAPI_POSTGRES_USER: ${{ secrets.HAPI_POSTGRES_USER }}
HAPI_POSTGRES_PASSWORD: ${{ secrets.HAPI_POSTGRES_PASSWORD }}
HAPI_HASURA_URL: ${{ secrets.HAPI_HASURA_URL }}
HAPI_HASURA_ADMIN_SECRET: ${{ secrets.HAPI_HASURA_ADMIN_SECRET }}
HAPI_PROXY_CONTRACT: regproxyinfo
HAPI_RATING_CONTRACT: rateproducer
HAPI_POSTGRES_DB: eosrate
HAPI_POSTGRES_HOST: postgres
HAPI_POSTGRES_PORT: 5432
HAPI_POSTGRES_SCHEMA: public
HAPI_EOS_API_ENDPOINT: https://api.main.alohaeos.com
HAPI_EOS_CHAIN_ID: aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906
HAPI_HYPERION_API: https://api.eossweden.org
HAPI_HYPERION_START_AT: '2022-03-01T00:00:00.000+00:00'
# hasura
HASURA_GRAPHQL_DATABASE_URL: ${{ secrets.HASURA_GRAPHQL_DATABASE_URL }}
HASURA_GRAPHQL_ADMIN_SECRET: ${{ secrets.HASURA_GRAPHQL_ADMIN_SECRET }}
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: ${{ secrets.HASURA_GRAPHQL_UNAUTHORIZED_ROLE }}
HASURA_GRAPHQL_ACTION_BASE_URL: http://hapi:9090
- name: Setup and deploy kubernetes environment
uses: steebchen/[email protected]
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
NAMESPACE: mainnet-eosrate
K8S_BUILD_DIR: build_k8s
with:
args: version && make deploy-kubernetes
- name: Create Release
id: create_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false