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: jobs:
deploy-hardhat: deploy-hardhat:
if: ${{ github.event.label.name == 'CI:Deploy' }} if: github.event.label.name == 'CI:Deploy'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
@ -39,23 +39,23 @@ jobs:
- name: Running image container - name: Running image container
run: | run: |
echo "Workspace path: /workspace/hardhat" echo "Workspace path: /workspace/hardhat"
docker run -d --name go-ethereum -p 8545:8545 -p 8546:8546 ghcr.io/denislav-mladenov/go-ethereum:latest \ docker run -d --name go-ethereum -p 8545:8545 -p 8546:8546 ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
--dev --dev \
--http --http \
--http.addr 0.0.0.0 --http.addr 0.0.0.0 \
--http.port 8545 --http.port 8545 \
--http.corsdomain "*" --http.corsdomain "*" \
--http.api personal,db,eth,net,web3 --http.api personal,db,eth,net,web3 \
--ws --ws \
--ws.addr 0.0.0.0 --ws.addr 0.0.0.0 \
--ws.port 8546 --ws.port 8546 \
--ws.origins "*" --ws.origins "*" \
--ws.api personal,db,eth,net,web3 --ws.api personal,db,eth,net,web3
- name: Copying the hardhat files to the container - name: Copying the hardhat files to the container
run: | run: |
docker exec go-ethereum mkdir -p /workspace/hardhat 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 docker exec go-ethereum ls -larth /workspace/hardhat
- name: Installing the required Node.js and npm - 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" 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 - name: Checking the hardhat version to verify that its working properly
run: | run: docker exec go-ethereum npx hardhat --version
docker exec go-ethereum npx hardhat --version
- name: Deploy hardhat sample project - name: Deploy hardhat sample project
run: | run: |
@ -84,3 +83,4 @@ jobs:
- name: Push new image to ghcr.io - name: Push new image to ghcr.io
run: docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/go-eth-hardhat:latest run: docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/go-eth-hardhat:latest