From 576defd48e8eb599e27aa7313029362a97bd39d5 Mon Sep 17 00:00:00 2001 From: Xiaying Peng Date: Tue, 18 Oct 2022 11:20:42 -0700 Subject: [PATCH] add geth docker --- action.yml | 18 ++++++++++++++++++ docker-compose.yml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 action.yml create mode 100644 docker-compose.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..a6e1c53 --- /dev/null +++ b/action.yml @@ -0,0 +1,18 @@ +name: 'Geth Action' +description: 'Private chain of Ethereum for test using geth' +outputs: + rpc_url: + description: "url of JSON RPC" + value: http://localhost:8546 + network_id: + description: "network id" + value: "10412" + chain_id: + description: "chain id" + value: "10412" +runs: + using: "composite" + steps: + - id: run + run: cd ${{ github.action_path }}; docker-compose up -d + shell: bash diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4b55e22 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,30 @@ +# Copyright 2022 Coinbase, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +version: '3' + +services: + geth-ethereum-mainnet: + image: ethereum/client-go:v1.10.23 + environment: + - DEVMODE=true + command: [ "--dev", "--dev.period", "0", + "--http", "--http.api", + "personal,eth,net,web3,debug", + "--http.addr", "0.0.0.0", + "--datadir", "./data", "--http.vhosts=*"] + volumes: + - ".docker/geth:/root" + ports: + - "8546:8545"