mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
adding build-push and compose .yml files
This commit is contained in:
parent
a9ab53d751
commit
28ddea13cf
3 changed files with 67 additions and 21 deletions
37
.github/workflows/build-push.yml
vendored
Normal file
37
.github/workflows/build-push.yml
vendored
Normal file
|
|
@ -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
|
||||||
|
|
||||||
9
.github/workflows/docker-compose.yml
vendored
Normal file
9
.github/workflows/docker-compose.yml
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
geth:
|
||||||
|
image: "${{ secrets.DOCKER_HUB_USERNAME }}/go-ethereum:latest"
|
||||||
|
ports:
|
||||||
|
- "8545:8545"
|
||||||
|
- "30303:30303"
|
||||||
|
|
||||||
42
.github/workflows/go.yml
vendored
42
.github/workflows/go.yml
vendored
|
|
@ -1,24 +1,24 @@
|
||||||
name: i386 linux tests
|
name: i386 linux tests
|
||||||
|
|
||||||
on:
|
# on:
|
||||||
push:
|
# push:
|
||||||
branches: [ master ]
|
# branches: [ master ]
|
||||||
pull_request:
|
# pull_request:
|
||||||
branches: [ master ]
|
# branches: [ master ]
|
||||||
workflow_dispatch:
|
# workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
# jobs:
|
||||||
build:
|
# build:
|
||||||
runs-on: self-hosted
|
# runs-on: self-hosted
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v4
|
# - uses: actions/checkout@v4
|
||||||
- name: Set up Go
|
# - name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
# uses: actions/setup-go@v5
|
||||||
with:
|
# with:
|
||||||
go-version: 1.23.0
|
# go-version: 1.23.0
|
||||||
cache: false
|
# cache: false
|
||||||
- name: Run tests
|
# - name: Run tests
|
||||||
run: go test -short ./...
|
# run: go test -short ./...
|
||||||
env:
|
# env:
|
||||||
GOOS: linux
|
# GOOS: linux
|
||||||
GOARCH: 386
|
# GOARCH: 386
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue