From bdfb173b45fe44ee97b60e0ec93e2745c90d65c4 Mon Sep 17 00:00:00 2001 From: Martin Totovski Date: Tue, 18 Mar 2025 21:47:33 +0000 Subject: [PATCH] [CI:Build] commiting on task #2 --- .github/workflows/docker-build.yaml | 29 +++++++++++++++++++++++++++++ docker-compose.yaml | 17 +++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/workflows/docker-build.yaml create mode 100644 docker-compose.yaml diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 0000000000..ea2920a4f9 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,29 @@ +name: Build and Push Docker image to my DockerHub repo + +on: + pull_request: + types: + - closed + +jobs: + build-and-push: + if: contains(github.event.pull_request.labels.*.name, 'CI:Build') && github.event.pull_request.merged == true + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Build Docker Image + run: | + docker build -t mtotovski/go-ethereum:latest . + + - name: Push Docker Image + run: | + docker push mtotovski/go-ethereum:latest diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000000..62df227c3e --- /dev/null +++ b/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