diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml index 10d24535f6..95143cefdd 100644 --- a/.github/workflows/ci-build.yaml +++ b/.github/workflows/ci-build.yaml @@ -48,6 +48,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . + file: Dockerfile push: true tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}:${{ env.ENVIRONMENT }}-latest,${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}:${{ env.ENVIRONMENT }}-${{ steps.autotag.outputs.tag }} labels: ${{ steps.metadata.outputs.labels }} \ No newline at end of file diff --git a/.github/workflows/ci-deploy.yaml b/.github/workflows/ci-deploy.yaml index 953b88f251..931fd87e89 100644 --- a/.github/workflows/ci-deploy.yaml +++ b/.github/workflows/ci-deploy.yaml @@ -34,3 +34,31 @@ jobs: working-directory: ./hardhat run: npx hardhat run scripts/deploy.ts --network localhost + - name: Autotag + id: autotag + uses: anothrNick/github-tag-action@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: false + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker metadata + id: metadata + uses: docker/metadata-action@v5 + with: + images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }} + + - name: Build and push to Docker Hub + uses: docker/build-push-action@v6 + with: + context: . + file: Dockerfile.contracts + push: true + tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}:${{ env.ENVIRONMENT }}-contracts-latest,${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}:${{ env.ENVIRONMENT }}-contracts-${{ steps.autotag.outputs.tag }} + labels: ${{ steps.metadata.outputs.labels }} + diff --git a/Dockerfile.contracts b/Dockerfile.contracts new file mode 100644 index 0000000000..0ae1b16c71 --- /dev/null +++ b/Dockerfile.contracts @@ -0,0 +1,12 @@ +FROM dmanov/go-ethereum:dev-latest + +COPY devnet /root/.ethereum + +CMD [ + "--dev", + "--http", + "--http.addr", "0.0.0.0", + "--http.api", "eth,net,web3,personal", + "--allow-insecure-unlock", + "--verbosity", "3" +]