Skip to content

Merge pull request #11 from JLay2026/feat/pytest-ci-integration #9

Merge pull request #11 from JLay2026/feat/pytest-ci-integration

Merge pull request #11 from JLay2026/feat/pytest-ci-integration #9

Workflow file for this run

---
# SPDX-FileCopyrightText: 2026 JLay2026
# SPDX-License-Identifier: MIT
#
# Build and publish partsmith container image to ghcr.io.
#
# Triggers:
# push to main -> :latest, :main, :sha-<full>
# push v*.*.* tag -> :X.Y.Z, :X.Y, :X
# workflow_dispatch -> :main, :sha-<full> (manual from Actions UI)
#
# After first run, the ghcr.io/jlay2026/partsmith package must be
# made public via repo Settings -> Packages -> "Change visibility" ->
# Public so downstream consumers (zimaboard-services) can pull
# without auth.
name: Release
on:
push:
branches: [main]
tags: ['v*.*.*']
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-and-push:
name: Build and push image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract image metadata
id: meta
uses: docker/metadata-action@v5
with:
# Hardcoded lowercase: GHCR requires lowercase repo names,
# and ${{ github.repository_owner }} preserves the source
# case (JLay2026). Hardcoding is safer than runtime lower-
# casing tricks.
images: ghcr.io/jlay2026/partsmith
tags: |
type=ref,event=branch
type=sha,prefix=sha-,format=long
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=partsmith
org.opencontainers.image.description=Minimal headless parametric-CAD server (build123d + REST + MCP)
org.opencontainers.image.licenses=MIT
org.opencontainers.image.source=https://github.com/JLay2026/partsmith
org.opencontainers.image.url=https://github.com/JLay2026/partsmith
org.opencontainers.image.documentation=https://github.com/JLay2026/partsmith/blob/main/README.md
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max