test deploy and push

This commit is contained in:
Dimitar Manov 2025-06-11 09:42:57 +03:00
parent 3eb8bf5d63
commit a3380ddbe7
3 changed files with 41 additions and 0 deletions

View file

@ -48,6 +48,7 @@ jobs:
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
file: Dockerfile
push: true push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}:${{ env.ENVIRONMENT }}-latest,${{ secrets.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}:${{ env.ENVIRONMENT }}-${{ steps.autotag.outputs.tag }} 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 }} labels: ${{ steps.metadata.outputs.labels }}

View file

@ -34,3 +34,31 @@ jobs:
working-directory: ./hardhat working-directory: ./hardhat
run: npx hardhat run scripts/deploy.ts --network localhost 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 }}

12
Dockerfile.contracts Normal file
View file

@ -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"
]