mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
Merge pull request #6 from denislav-mladenov/new_branch
Testing the setup
This commit is contained in:
commit
bc9aea60b0
4 changed files with 92 additions and 30 deletions
4
.github/workflows/docker-build.yml
vendored
4
.github/workflows/docker-build.yml
vendored
|
|
@ -1,5 +1,5 @@
|
|||
name: docker-build
|
||||
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
|
@ -35,6 +35,6 @@ jobs:
|
|||
|
||||
- name: Build docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
|
|
|
|||
86
.github/workflows/docker-deploy.yml
vendored
Normal file
86
.github/workflows/docker-deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
name: deploy-hardhat
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
types: [ labeled ]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: denislav-mladenov/go-ethereum
|
||||
|
||||
jobs:
|
||||
deploy-hardhat:
|
||||
if: ${{ github.event.label.name == 'CI:Deploy' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Pull image
|
||||
run: docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
|
||||
- name: Running image container
|
||||
run: |
|
||||
echo "Workspace path: /workspace/hardhat"
|
||||
docker run -d --name go-ethereum -p 8545:8545 -p 8546:8546 ghcr.io/denislav-mladenov/go-ethereum:latest \
|
||||
--dev
|
||||
--http
|
||||
--http.addr 0.0.0.0
|
||||
--http.port 8545
|
||||
--http.corsdomain "*"
|
||||
--http.api personal,db,eth,net,web3
|
||||
--ws
|
||||
--ws.addr 0.0.0.0
|
||||
--ws.port 8546
|
||||
--ws.origins "*"
|
||||
--ws.api personal,db,eth,net,web3
|
||||
|
||||
- name: Copying the hardhat files to the container
|
||||
run: |
|
||||
docker exec go-ethereum mkdir -p /workspace/hardhat
|
||||
docker cp ${{ github.workspace }}/hardhat go-ethereum:/workspace/
|
||||
docker exec go-ethereum ls -larth /workspace/hardhat
|
||||
|
||||
- name: Installing the required Node.js and npm
|
||||
run: |
|
||||
docker exec go-ethereum apk add --no-cache nodejs npm
|
||||
|
||||
- name: Installation of hardhat
|
||||
run: docker exec go-ethereum sh -c "cd /workspace/hardhat && npm install --save-dev hardhat"
|
||||
|
||||
- name: Checking the hardhat version to verify that its working properly
|
||||
run: |
|
||||
docker exec go-ethereum npx hardhat --version
|
||||
|
||||
- name: Deploy hardhat sample project
|
||||
run: |
|
||||
docker exec go-ethereum sh -c "cd /workspace/hardhat && yes | npx hardhat ignition deploy ./ignition/modules/Token.js --network devnet"
|
||||
|
||||
- name: Testing contracts
|
||||
run: |
|
||||
docker exec go-ethereum sh -c "cd /workspace/hardhat && npx hardhat test"
|
||||
|
||||
- name: Build a new docker image
|
||||
run: |
|
||||
docker commit go-ethereum go-eth-hardhat:latest
|
||||
docker tag go-eth-hardhat:latest ${{ env.REGISTRY }}/${{ github.repository_owner }}/go-eth-hardhat:latest
|
||||
|
||||
- name: Push new image to ghcr.io
|
||||
run: docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/go-eth-hardhat:latest
|
||||
24
.github/workflows/go.yml
vendored
24
.github/workflows/go.yml
vendored
|
|
@ -1,24 +0,0 @@
|
|||
name: i386 linux tests
|
||||
|
||||
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.21.4
|
||||
cache: false
|
||||
- name: Run tests
|
||||
run: go test -short ./...
|
||||
env:
|
||||
GOOS: linux
|
||||
GOARCH: 386
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
version: '3.8'
|
||||
|
||||
|
||||
services:
|
||||
geth:
|
||||
image: denislav-mladenov/go-ethereum:latest
|
||||
image: ghcr.io/denislav-mladenov/go-ethereum:latest
|
||||
ports:
|
||||
- "8545:8545"
|
||||
- "8546:8546"
|
||||
- "30303:30303"
|
||||
command: >
|
||||
- "30303:30303
|
||||
command:
|
||||
--dev
|
||||
--http
|
||||
--http.addr 0.0.0.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue