Skip to content

Merge pull request #199 from bitfinity-network/update_sdk_deps #127

Merge pull request #199 from bitfinity-network/update_sdk_deps

Merge pull request #199 from bitfinity-network/update_sdk_deps #127

name: 'Deploy EVM Docker Images'
on:
workflow_dispatch: {}
push:
branches: [main]
tags:
- 'v*'
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-to-github:
strategy:
matrix:
image: ["evm-block-extractor", "evm-log-extractor"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: gh-meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}
- name: Build and push Docker image to GitHub Container Registry
uses: docker/build-push-action@v5
with:
context: .
file: ./src/${{ matrix.image }}/Dockerfile
push: true
tags: ${{ steps.gh-meta.outputs.tags }}
deploy-to-gcp:
env:
IMAGE_NAME: evm-block-extractor
GCP_REGISTRY: us-east4-docker.pkg.dev
runs-on: ubuntu-latest
needs: deploy-to-github
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GCP Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GCP_REGISTRY }}
username: _json_key
password: ${{ secrets.EXTRACTOR_GCP_DOCKER_KEY }}
- name: Extract metadata (tags, labels) for Docker
id: gcp-meta
uses: docker/metadata-action@v5
with:
images: ${{ env.GCP_REGISTRY }}/extractor-410310/block-extractor-repo/${{ env.IMAGE_NAME }}
- name: Build and push Docker image to GCP Registry
uses: docker/build-push-action@v5
with:
context: .
file: ./src/evm-block-extractor/Dockerfile
push: true
tags: ${{ steps.gcp-meta.outputs.tags }}