Skip to content

Create docker-publish.yml #1

Create docker-publish.yml

Create docker-publish.yml #1

name: Build and Push Docker Images
on:
push:
branches:
- main
workflow_dispatch:
env:
REGISTRY: docker.io
IMAGE_NAMESPACE: magicdude4eva
jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
component:
- bitcoin
- ckpool
- ckstats
- bitcoin-explorer
- fulcrum
- grafana
- influxdb
- mempool
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./${{ matrix.component }}
file: ./${{ matrix.component }}/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/btc-${{ matrix.component }}:latest