Skip to content

Merge pull request #1268 from edenia/dev #42

Merge pull request #1268 from edenia/dev

Merge pull request #1268 from edenia/dev #42

Workflow file for this run

name: Build images for libre mainnet environment
on:
push:
tags:
- libre-v*
jobs:
create-libre-image:
runs-on: ubuntu-latest
environment: libre
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 'step-log'
run: |
echo "github.ref: ${{github.ref}}"
- 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 }}
# webapp
PORT: '80'
REACT_APP_TITLE: 'Libre Network Dashboard'
REACT_APP_VERSION: ${{github.ref}}
REACT_APP_DEFAULT_PRODUCER_LOGO: 'https://antelope.tools/images/libre.png'
REACT_APP_FOOTER_LINKS: '[{ "text": "Libre Website", "src": "https://libre.org/" },{ "text": "Libre Block Explorer", "src": "https://www.libreblocks.io/" },{"text": "Documentation","src": "https://libre-chain.gitbook.io/"},{"text": "Libre Network Monitor","src": "https://libre.antelope.tools"}]'
REACT_APP_EOS_RATE_LINK: ''
REACT_APP_USE_REWARDS: 'true'
REACT_APP_USE_VOTES: 'true'
REACT_APP_HASURA_URL: 'https://graphql-libre.antelope.tools/v1/graphql'
REACT_APP_EOS_API_NETWORK_NAME: 'libre'
REACT_APP_EOS_API_NETWORK_LABEL: 'Libre Mainnet'
REACT_APP_EOS_API_NETWORK_LOGO: 'https://antelope.tools/images/libre.png'
REACT_APP_EOS_API_HOSTS: '[\"libre.edenia.cloud\",\"libre.eosusa.io\",\"api.libre.cryptolions.io\"]'
REACT_APP_EOS_API_PORT: '443'
REACT_APP_EOS_API_PROTOCOL: 'https'
REACT_APP_EOS_CHAIN_ID: '38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465'
REACT_APP_EOS_USE_BP_JSON_ON_CHAIN: 'false'
REACT_APP_EOS_BP_JSON_ON_CHAIN_CONTRACT: 'producerjson'
REACT_APP_EOS_BP_JSON_ON_CHAIN_TABLE: 'producerjson'
REACT_APP_EOS_BP_JSON_ON_CHAIN_SCOPE: 'producerjson'
REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000
REACT_APP_TOKEN_SYMBOL: 'LIBRE'
REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":5},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":3},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":4},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":1},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":2},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":5},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":3},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":4},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":1},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":2},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]'
REACT_APP_DISABLED_MENU_ITEMS: '["/stress-test","/evm","/evm-rpc-endpoints"]'
REACT_APP_BLOCK_EXPLORER_URL: 'https://www.libreblocks.io/tx/(transaction)'
REACT_APP_STATE_HISTORY_ENABLED: 'true'
REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8'
REACT_APP_PUBLIC_RE_CAPTCHA_KEY: ${{ secrets.REACT_APP_PUBLIC_RE_CAPTCHA_KEY }}
- name: Build and deploy kubernetes files
id: build_kubernetes_files
run: |
make \
build-kubernetes
env:
# general
NAMESPACE: libre-dashboard
INGRESS_HOST: libre.antelope.tools
INGRESS_GRAPHQL_HOST: graphql-libre.antelope.tools
# webapp
REACT_APP_EOS_API_NETWORK_NAME: libre
# postgres
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ secrets.POSTGRES_DB }}
POSTGRES_DATA: ${{ secrets.POSTGRES_DATA }}
# hapi
HAPI_EOS_API_NETWORK_NAME: libre
HAPI_EOS_API_ENDPOINTS: '["https://libre.edenia.cloud","https://libre.eosusa.io","https://api.libre.cryptolions.io"]'
HAPI_EOS_STATE_HISTORY_PLUGIN_ENDPOINT: 'ws://api-node.libre:8080'
HAPI_EOS_MISSED_BLOCKS_ENABLED: 'true'
HAPI_EOS_BLOCK_HISTORY_DAYS: 90
HAPI_EOS_MAX_CPU_BLOCK: 100000
HAPI_EOS_MAX_NET_BLOCK: 1048576
HAPI_EOS_API_CHAIN_ID: 38b1d7815474d0c60683ecbea321d723e83f5da6ae5f1c1f9fecc69d9ba96465
HAPI_EOS_BASE_ACCOUNT: ${{ secrets.HAPI_EOS_BASE_ACCOUNT }}
HAPI_EOS_BASE_ACCOUNT_PASSWORD: ${{ secrets.HAPI_EOS_BASE_ACCOUNT_PASSWORD }}
HAPI_EOS_MECHANICS_ACCOUNT: ${{ secrets.HAPI_EOS_MECHANICS_ACCOUNT }}
HAPI_EOS_MECHANICS_PASSWORD: ${{ secrets.HAPI_EOS_MECHANICS_PASSWORD }}
HAPI_EOS_MECHANICS_CUSTOM_PERMISSION: 'benchmark'
HAPI_EOS_FAUCET_ACCOUNT_PASSWORD: ${{ secrets.HAPI_EOS_FAUCET_ACCOUNT_PASSWORD }}
GOOGLE_CREDENTIALS_JSON: ${{ secrets.GOOGLE_CREDENTIALS_JSON }}
HAPI_EOS_WALLET_URL: http://dashboard-wallet:8888
HAPI_EOS_BP_JSON_ON_CHAIN: 'false'
HAPI_EOS_BP_JSON_ON_CHAIN_CONTRACT: producerjson
HAPI_EOS_BP_JSON_ON_CHAIN_TABLE: producerjson
HAPI_EOS_BP_JSON_ON_CHAIN_SCOPE: producerjson
HAPI_HASURA_URL: 'http://dashboard-hasura:8080/v1/graphql'
HAPI_HASURA_ADMIN_SECRET: ${{ secrets.HAPI_HASURA_ADMIN_SECRET }}
HAPI_SERVER_PORT: '9090'
HAPI_SERVER_ADDRESS: '0.0.0.0'
HAPI_DATABASE_URL: ${{ secrets.HAPI_DATABASE_URL }}
HAPI_SYNC_PRODUCERS_INTERVAL: '14400'
HAPI_SYNC_PRODUCER_CPU_INTERVAL: '6'
HAPI_SYNC_PRODUCER_INFO_INTERVAL: '1'
HAPI_SYNC_SCHEDULE_HISTORY_INTERVAL: 86400
HAPI_SYNC_STATS_INTERVAL: 3600
HAPI_EOS_EXCHANGE_RATE_API: 'https://dashboard-api.libre.org/exchange-rates'
HAPI_COINGECKO_API_TOKEN_ID: LIBRE
HAPI_REWARDS_TOKEN: LIBRE
HAPI_CREATE_ACCOUNT_ACTION_NAME: newaccount
HAPI_EOS_FAUCET_ACCOUNT: ${{ secrets.HAPI_EOS_FAUCET_ACCOUNT }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
HAPI_EOS_GET_FAUCET_ACCOUNT: ${{ secrets.HAPI_EOS_GET_FAUCET_ACCOUNT }}
HAPI_PUBLIC_RE_CAPTCHA_KEY: ${{ secrets.HAPI_PUBLIC_RE_CAPTCHA_KEY }}
HAPI_RE_CAPTCHA_PROJECT_ID: ${{ secrets.HAPI_RE_CAPTCHA_PROJECT_ID }}
# 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: guest
HASURA_GRAPHQL_ACTION_BASE_URL: http://dashboard-hapi:9090
- name: Setup and deploy kubernetes environment
uses: steebchen/[email protected]
env:
KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }}
NAMESPACE: libre-dashboard
K8S_BUILD_DIR: build_k8s
with:
args: version && make deploy-kubernetes