generated from edenia/backend-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (72 loc) · 2.68 KB
/
push-prod-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
name: Build images from latest master branch
on:
workflow_dispatch:
push:
tags:
- v*
jobs:
create-prod-image:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout Repo
uses: actions/checkout@v1
- 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: Build new images and push
run: |
make \
build-docker-images \
push-docker-images
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build kubernetes files
id: build_kubernetes_files
run: |
make \
build-kubernetes
env:
# general
NAMESPACE: api-eden
INGRESS_GRAPHQL_HOST: eden-api.edenia.cloud
# postgres
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_DATA: ${{ secrets.POSTGRES_DATA }}
# hapi
HAPI_SERVER_PORT: 9090
HAPI_SERVER_ADDRESS: 0.0.0.0
HAPI_NETWORK_API: "https://api.eosn.io"
HAPI_NETWORK_CHAIN_ID: "aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906"
HAPI_HASURA_URL: ${{ secrets.HAPI_HASURA_URL }}
HAPI_HASURA_ADMIN_SECRET: ${{ secrets.HAPI_HASURA_ADMIN_SECRET }}
HAPI_EDENSMARTPRX_CONTRACT: "edensmartprx"
HAPI_EDEN_CONTRACT: "genesis.eden"
HAPI_AA_BASE_URL: "https://eos.api.atomicassets.io"
# hasura
HASURA_GRAPHQL_ENABLE_CONSOLE: true
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: ${{ secrets.HASURA_GRAPHQL_ACTION_BASE_URL }}
- name: Deploy kubernetes files
uses: steebchen/[email protected]
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
NAMESPACE: eden-api
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