Testing the deployment

This commit is contained in:
denislav-mladenov 2024-07-17 21:06:23 +03:00
parent 83264d4530
commit b5f925dc0d

View file

@ -13,7 +13,7 @@ env:
jobs:
deploy-hardhat:
if: ${{ github.event.label.name == 'CI:Deploy' }}
if: github.event.label.name == 'CI:Deploy'
runs-on: ubuntu-latest
permissions:
contents: read
@ -39,23 +39,23 @@ jobs:
- 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 "*"
docker run -d --name go-ethereum -p 8545:8545 -p 8546:8546 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}: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 cp ${{ github.workspace }}/hardhat go-ethereum:/workspace/hardhat
docker exec go-ethereum ls -larth /workspace/hardhat
- name: Installing the required Node.js and npm
@ -66,8 +66,7 @@ jobs:
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
run: docker exec go-ethereum npx hardhat --version
- name: Deploy hardhat sample project
run: |
@ -84,3 +83,4 @@ jobs:
- name: Push new image to ghcr.io
run: docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/go-eth-hardhat:latest