From 1c9dc72278c6806734aeda27ecccf4a85a64eb8b Mon Sep 17 00:00:00 2001 From: Martin Totovski Date: Tue, 18 Mar 2025 21:26:47 +0000 Subject: [PATCH] [CI:Build] Init commit --- .github/docker-compose.yaml | 17 +++++++++++++++++ .github/workflows/docker-build.yaml | 29 +++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/docker-compose.yaml create mode 100644 .github/workflows/docker-build.yaml diff --git a/.github/docker-compose.yaml b/.github/docker-compose.yaml new file mode 100644 index 0000000000..62df227c3e --- /dev/null +++ b/.github/docker-compose.yaml @@ -0,0 +1,17 @@ +version: '3.8' + +services: + geth-node: + image: mtotovski/go-ethereum:latest + container_name: geth-devnet + ports: + - "8545:8545" + - "30303:30303" + command: > + --dev + --http + --http.addr 0.0.0.0 + --http.port 8545 + --http.api eth,net,web3 + --http.corsdomain "*" + --allow-insecure-unlock diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 0000000000..611c03f8ff --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,29 @@ +name: Build and Push Docker image to DockerHub + +on: + pull_request: + types: + - closed + +jobs: + check-label-and-build: + if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'CI:Build') + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log into Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build Docker image + run: | + docker build -t mtotovski/go-ethereum:latest . + + - name: Push Docker image + run: | + docker push mtotovski/go-ethereum:latest