Skip to content

Build docker images #51

Build docker images

Build docker images #51

Workflow file for this run

name: Create Docker Container
on:
push:
branches:
- 'main'
- 'dev'
tags:
- 'v*'
jobs:
build-and-push-images:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./Dockerfile-dbtool
image: ipbhalle/mb3dbtool
- dockerfile: ./Dockerfile
image: ipbhalle/mb3server
- dockerfile: ./Dockerfile-frontend
image: ipbhalle/mb3frontend
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
file: ${{ matrix.dockerfile }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}