Skip to content

chore: enrich problem seed data and tag-based lists #124

chore: enrich problem seed data and tag-based lists

chore: enrich problem seed data and tag-based lists #124

name: Docker Publish
on:
push:
branches: [main]
concurrency:
group: docker-publish
cancel-in-progress: true
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
name: Build & Push (${{ matrix.service.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
service:
- name: backend
dockerfile: ./backend-spring/Dockerfile
- name: console
dockerfile: ./console/Dockerfile
- name: management
dockerfile: ./management/Dockerfile
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Log in to GHCR
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service.name }}
tags: |
type=sha
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: ${{ matrix.service.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max