Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.

Merge pull request #27 from rwlove/ui-polish #13

Merge pull request #27 from rwlove/ui-polish

Merge pull request #27 from rwlove/ui-polish #13

name: Publish Container Images
on:
push:
tags: ["v*"]
env:
REGISTRY: ghcr.io
jobs:
build:
name: Build and push ${{ matrix.image }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- image: workoutdiary-api
dockerfile: Dockerfile.api
description: "WorkoutDiary JSON API backend"
- image: workoutdiary-frontend
dockerfile: Dockerfile.frontend
description: "WorkoutDiary web frontend (connects to API backend)"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.image }}
labels: |
org.opencontainers.image.description=${{ matrix.description }}
tags: |
type=ref,event=tag
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.ref_name }}
cache-from: type=gha,scope=${{ matrix.image }}
cache-to: type=gha,mode=max,scope=${{ matrix.image }}