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