Skip to content

Improve the Dockerfile and set the CI workflow #1

Improve the Dockerfile and set the CI workflow

Improve the Dockerfile and set the CI workflow #1

name: Build Docker image
on:
push:
branches: [master]
jobs:
build:
name: Build ethstats-client
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: hemilabs/ethstats-client
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}