mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
fix
This commit is contained in:
parent
11cef813b4
commit
e05f2c0dbc
1 changed files with 13 additions and 13 deletions
26
.github/workflows/ci-deploy.yml
vendored
26
.github/workflows/ci-deploy.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: Deploy Contracts to Devnet
|
||||
name: Deploy Contracts to Devnet
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
|
@ -13,37 +13,37 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Start Geth devnet from image
|
||||
- name: Start Geth devnet container
|
||||
run: |
|
||||
docker run -d --name geth-devnet -p 8545:8545 \
|
||||
ghcr.io/${{ github.repository_owner }}/go-ethereum:dev-latest \
|
||||
geth --http --http.addr 0.0.0.0 --http.port 8545 \
|
||||
--http.api eth,net,web3 \
|
||||
--dev
|
||||
geth --http --http.addr 0.0.0.0 --http.port 8545 --http.api eth,net,web3 --dev
|
||||
|
||||
- name: Wait for devnet to be ready
|
||||
- name: Wait for Geth RPC to be available
|
||||
run: |
|
||||
sleep 10
|
||||
curl --fail http://localhost:8545 || exit 1
|
||||
for i in {1..10}; do
|
||||
curl -s http://localhost:8545 && break
|
||||
echo "Waiting for Geth RPC..." && sleep 3
|
||||
done
|
||||
|
||||
- name: Install Hardhat dependencies
|
||||
working-directory: hardhat
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Deploy Hardhat contracts to local devnet
|
||||
- name: Deploy contracts to devnet
|
||||
working-directory: hardhat
|
||||
run: npx hardhat run scripts/deploy.js --network localhost
|
||||
|
||||
- name: Commit devnet container with contracts
|
||||
- name: Commit container as new image with contracts
|
||||
run: |
|
||||
docker commit geth-devnet ghcr.io/${{ github.repository_owner }}/go-ethereum:devnet-with-contracts
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
- name: Log in to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Push image with deployed contracts
|
||||
- name: Push new image
|
||||
run: docker push ghcr.io/${{ github.repository_owner }}/go-ethereum:devnet-with-contracts
|
||||
|
|
|
|||
Loading…
Reference in a new issue