Skip to content

Commit

Permalink
Build images and push to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus committed Dec 15, 2021
1 parent 16fdec1 commit 424ec1a
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 33 deletions.
127 changes: 127 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: Build
on:
push:
branches:
- 'master'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'master'

jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DOCKER_REGISTRY: ghcr.io
DOCKER_IMAGE_BASE: ${{ github.repository }}
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to the registry
uses: docker/login-action@v1
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Elastic

- name: Elastic image tags & labels
id: meta-elastic
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_IMAGE_BASE }}-elastic

- name: Elastic image build & push
uses: docker/build-push-action@v2
with:
context: .
file: build/elastic/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-elastic.outputs.tags }}
labels: ${{ steps.meta-elastic.outputs.labels }}

# DB

- name: DB image tags & labels
id: meta-db
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_IMAGE_BASE }}-db

- name: DB
uses: docker/build-push-action@v2
with:
context: .
file: build/db/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-db.outputs.tags }}
labels: ${{ steps.meta-db.outputs.labels }}

# API

- name: API image tags & labels
id: meta-api
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_IMAGE_BASE }}-api

- name: API image build & push
uses: docker/build-push-action@v2
with:
context: .
file: build/api/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}

# Indexer

- name: Indexer image tags & labels
id: meta-indexer
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_IMAGE_BASE }}-indexer

- name: Indexer image build & push
uses: docker/build-push-action@v2
with:
context: .
file: build/indexer/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-indexer.outputs.tags }}
labels: ${{ steps.meta-indexer.outputs.labels }}

# Metrics

- name: Metrics image tags & labels
id: meta-metrics
uses: docker/metadata-action@v3
with:
images: ${{ env.DOCKER_IMAGE_BASE }}-metrics

- name: Metrics image build & push
uses: docker/build-push-action@v2
with:
context: .
file: build/metrics/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.meta-metrics.outputs.tags }}
labels: ${{ steps.meta-metrics.outputs.labels }}
34 changes: 1 addition & 33 deletions configs/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,18 @@ rpc:
mainnet:
uri: ${MAINNET_RPC_URI:-https://rpc.tzkt.io/mainnet}
timeout: 20
florencenet:
uri: ${TESTNET_RPC_URI:-https://rpc.tzkt.io/florencenobanet}
timeout: 20
granadanet:
uri: ${NEXTNET_RPC_URI:-https://rpc.tzkt.io/granadanet}
timeout: 20
hangzhounet:
uri: https://rpc.tzkt.io/hangzhounet
timeout: 20
hangzhou2net:
uri: https://rpc.tzkt.io/hangzhou2net
timeout: 20

tzkt:
mainnet:
uri: https://api.tzkt.io/v1/
base_uri: https://tzkt.io/
timeout: 20

services:
mainnet:
mempool: https://mempool.dipdup.net/v1/graphql
florencenet:
granadanet:
mempool: https://mempool.staging.dipdup.net/v1/graphql
hangzhounet:
mempool: https://mempool.staging.dipdup.net/v1/graphql
hangzhou2net:
mempool: https://mempool.staging.dipdup.net/v1/graphql

Expand All @@ -50,12 +36,6 @@ base_url: https://better-call.dev

ipfs:
- ${SANDBOX_IPFS_GATEWAY:-https://ipfs.baking-bad.org}
# - https://dweb.link
# - https://ipfs.io

domains:
edo2net: KT1KP2Yy6MNkYKkHqroGBZ7KFN5NdNfnUHHv
# mainnet: KT1GBZmSxmnKJXGMdMLbugPfLyUPmuLSMwKS

api:
project_name: api
Expand All @@ -71,29 +51,19 @@ api:
sandbox_mode: false
networks:
- mainnet
- florencenet
- granadanet
- hangzhounet
- hangzhou2net
pinata:
key: ${PINATA_KEY}
secret_key: ${PINATA_SECRET_KEY}
timeout_seconds: 10
connections:
max: 50
idle: 10


indexer:
project_name: indexer
sentry_enabled: true
skip_delegator_blocks: false
networks:
mainnet:
boost: tzkt
florencenet:
granadanet:
hangzhounet:
hangzhou2net:
connections:
max: 5
Expand All @@ -115,9 +85,7 @@ scripts:
secret_access_key: ${AWS_SECRET_ACCESS_KEY}
networks:
- mainnet
- florencenet
- granadanet
- hangzhounet
- hangzhou2net
connections:
max: 5
Expand Down

0 comments on commit 424ec1a

Please sign in to comment.