diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 0000000000..62348e63a2 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,34 @@ +name: Build and Push to Google Artifact Registry + +on: + push: + branches: + - main + +jobs: + build-and-push: + if: contains(github.event.head_commit.message, 'CI:Build') + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Authenticate to Google Cloud + uses: google-github-actions/auth@v2 + with: + credentials_json: '${{ secrets.GCP_SERVICE_KEY }}' + + - name: Configure Docker for Artifact Registry + run: | + gcloud auth configure-docker europe-west3-docker.pkg.dev + + - name: Build and Push to Artifact Registry + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: europe-west3-docker.pkg.dev/task-460410/task-repo/app:latest diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..8f430cbd37 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,28 @@ +version: "3.8" + +services: + geth-node: + image: europe-west3-docker.pkg.dev/task-460410/task-repo/app:test + container_name: geth-devnet + ports: + - "8545:8545" # RPC HTTP + - "8546:8546" # WebSocket + - "30303:30303" # P2P + - "30303:30303/udp" + volumes: + - ./data:/root/.ethereum + command: > + --dev + --http + --http.addr 0.0.0.0 + --http.port 8545 + --http.api personal,eth,net,web3,miner + --ws + --ws.addr 0.0.0.0 + --ws.port 8546 + --ws.api personal,eth,net,web3,miner + --allow-insecure-unlock + --mine + --miner.threads=1 + --nodiscover + restart: unless-stopped