Skip to content

Merge pull request #226 from dscc-admin-ch/wip_371_k8s #167

Merge pull request #226 from dscc-admin-ch/wip_371_k8s

Merge pull request #226 from dscc-admin-ch/wip_371_k8s #167

Workflow file for this run

name: Build and Push Docker images
on:
push:
branches:
- develop
release:
types:
- published
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: dsccadminch/lomas_server
target: lomas_server
- image: dsccadminch/lomas_admin_dashboard
target: lomas_admin_dashboard
steps:
-
name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images:
${{ matrix.image }}
tags: |
type=sha
type=semver, pattern={{version}}
type=raw,value=latest,enable=${{ github.event_name == 'release' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
target: ${{ matrix.target }}
tags: ${{ steps.meta.outputs.tags }}