diff --git a/.github/workflows/ci_deploy.yaml b/.github/workflows/ci_deploy.yaml index 634a006e18..5ae3359871 100644 --- a/.github/workflows/ci_deploy.yaml +++ b/.github/workflows/ci_deploy.yaml @@ -46,13 +46,8 @@ jobs: # npm install --save-dev @nomicfoundation/hardhat-toolbox # npx hardhat ignition deploy ./ignition/modules/Lock.js - - name: Run docker container with the Apollo contract - run: docker run -p 127.0.0.1:8551:8545 --rm hardhat-ignition - - name: Hardhat test - run: npx hardhat test - - name: Build and push Docker image uses: docker/build-push-action@v5 with: diff --git a/hardhat/Dockerfile b/hardhat/Dockerfile index d84144f35a..c0ccc748e1 100644 --- a/hardhat/Dockerfile +++ b/hardhat/Dockerfile @@ -12,4 +12,10 @@ COPY . . EXPOSE 8545 -CMD ["npx", "hardhat", "ignition", "deploy", "/usr/app/ignition/modules/Apollo.js"] \ No newline at end of file +COPY entrypoint.sh /usr/app/entrypoint.sh + +RUN chmod +x /usr/app/entrypoint.sh + +ENTRYPOINT ["/usr/app/entrypoint.sh"] + +#CMD ["npx", "hardhat", "ignition", "deploy", "/usr/app/ignition/modules/Apollo.js"] \ No newline at end of file diff --git a/hardhat/entrypoint.sh b/hardhat/entrypoint.sh new file mode 100644 index 0000000000..458b059dfd --- /dev/null +++ b/hardhat/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Deploy the contracts using Hardhat Ignition +npx hardhat ignition deploy /usr/app/ignition/modules/Apollo.js + +# Run the tests +npx hardhat test