Skip to content

Commit d1d136b

Browse files
committed
Extraction of md
1 parent 69d5a3c commit d1d136b

3 files changed

Lines changed: 26 additions & 15 deletions

File tree

.github/workflows/publish-evm-block-extractor.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
tags:
99
- 'v*'
1010

11-
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
11+
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
1212
permissions:
1313
contents: read
1414
packages: write
@@ -19,6 +19,7 @@ concurrency:
1919

2020
env:
2121
IMAGE_NAME: evm-block-extractor
22+
GCP_REGISTRY: us-east4-docker.pkg.dev
2223

2324
jobs:
2425
deploy-to-github:
@@ -35,13 +36,19 @@ jobs:
3536
username: ${{ github.actor }}
3637
password: ${{ secrets.GITHUB_TOKEN }}
3738

39+
- name: Extract metadata (tags, labels) for Docker
40+
id: gh-meta
41+
uses: docker/metadata-action@v5
42+
with:
43+
images: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
44+
3845
- name: Build and push Docker image to GitHub Container Registry
3946
uses: docker/build-push-action@v5
4047
with:
4148
context: .
4249
file: ./src/evm-block-extractor/Dockerfile
4350
push: true
44-
tags: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
51+
tags: ${{ steps.gh-meta.outputs.tags }}
4552

4653
deploy-to-gcp:
4754
runs-on: ubuntu-latest
@@ -53,14 +60,20 @@ jobs:
5360
- name: Log in to GCP Registry
5461
uses: docker/login-action@v3
5562
with:
56-
registry: us-east4-docker.pkg.dev
63+
registry: ${{env.GCP_REGISTRY}}
5764
username: _json_key
5865
password: ${{ secrets.EXTRACTOR_GCP_DOCKER_KEY }}
5966

67+
- name: Extract metadata (tags, labels) for Docker
68+
id: gcp-meta
69+
uses: docker/metadata-action@v5
70+
with:
71+
images: ${{env.GCP_REGISTRY}}/extractor-410310/block-extractor-repo/${{ env.IMAGE_NAME }}
72+
6073
- name: Build and push Docker image to GCP Registry
6174
uses: docker/build-push-action@v5
6275
with:
6376
context: .
6477
file: ./src/evm-block-extractor/Dockerfile
6578
push: true
66-
tags: us-east4-docker.pkg.dev/extractor-410310/block-extractor-repo/${{ env.IMAGE_NAME }}:latest
79+
tags: ${{ steps.gcp-meta.outputs.tags }}

docker-compose.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
1-
version: "3.3"
1+
version: '3.3'
22

33
#
44
# This docker-compose file is used to start the services for local testing.
55
# It starts a evm-blockchain-extractor connected to a local postgres database.
66
#
77

88
services:
9-
109
db:
11-
image: "postgres:11-alpine"
10+
image: 'postgres:11-alpine'
1211
ports:
13-
- "5432:5432"
12+
- '5432:5432'
1413
environment:
1514
POSTGRES_PASSWORD: postgres
1615
POSTGRES_USER: postgres
1716

18-
1917
extractor:
20-
image: ghcr.io/bitfinity-network/evm-block-extractor:main
21-
# image: "evm-block-extractor:latest"
22-
# build:
23-
# dockerfile: ./src/evm-block-extractor/Dockerfile
18+
# image: ghcr.io/bitfinity-network/evm-block-extractor:main
19+
image: "evm-block-extractor:latest"
20+
build:
21+
dockerfile: ./src/evm-block-extractor/Dockerfile
2422
ports:
25-
- "8080:8080"
23+
- '8080:8080'
2624
command: --rpc-url https://testnet.bitfinity.network --postgres --username postgres --password postgres --database-name postgres --database-url db

src/evm-block-extractor/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::database::DatabaseClient;
1111

1212
const VERSION: &str = env!("CARGO_PKG_VERSION");
1313

14-
/// Simple CLI program for Benchmarking BitFinity Network
14+
/// Simple CLI parser for the EVM block extractor
1515
#[derive(Parser, Debug, Clone)]
1616
#[clap(
1717
version = VERSION,

0 commit comments

Comments
 (0)