diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml new file mode 100644 index 0000000000..299d949862 --- /dev/null +++ b/.github/workflows/build-push.yml @@ -0,0 +1,37 @@ +name: Build and Push Docker Image + +# Adding a comment to trigger the workflow + +on: + pull_request: + types: [closed] + branches: + - main + labels: + - CI:Build + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_PAT }} + + - name: Set ENV Variable for Docker Compose + run: echo "DOCKER_HUB_USERNAME=${{ secrets.DOCKER_HUB_USERNAME }}" >> $GITHUB_ENV + + - name: Build and Push Docker Image + run: | + docker build -t ${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest . + docker push ${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest + diff --git a/.github/workflows/docker-compose.yml b/.github/workflows/docker-compose.yml new file mode 100644 index 0000000000..3b69d1cb9c --- /dev/null +++ b/.github/workflows/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3.8' + +services: + geth: + image: "${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest" + ports: + - "8545:8545" + - "30303:30303" + diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6406d2fa3d..5f44ed076b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,24 +1,24 @@ name: i386 linux tests -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - workflow_dispatch: +# on: +# push: +# branches: [ master ] +# pull_request: +# branches: [ master ] +# workflow_dispatch: -jobs: - build: - runs-on: self-hosted - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.23.0 - cache: false - - name: Run tests - run: go test -short ./... - env: - GOOS: linux - GOARCH: 386 +# jobs: +# build: +# runs-on: self-hosted +# steps: +# - uses: actions/checkout@v4 +# - name: Set up Go +# uses: actions/setup-go@v5 +# with: +# go-version: 1.23.0 +# cache: false +# - name: Run tests +# run: go test -short ./... +# env: +# GOOS: linux +# GOARCH: 386