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"