Skip to content

release: v1.0.4 - official PyPI + Docker Hub distribution #1

release: v1.0.4 - official PyPI + Docker Hub distribution

release: v1.0.4 - official PyPI + Docker Hub distribution #1

Workflow file for this run

name: Publish Docker image
# Builds the all-in-one image and pushes it to Docker Hub on every version tag.
# One-time setup (GitHub repo → Settings → Secrets and variables → Actions):
# - Variable DOCKERHUB_USERNAME = your Docker Hub username (e.g. davidesidoti)
# - Secret DOCKERHUB_TOKEN = a Docker Hub access token (Account → Security)
# Image is published as <DOCKERHUB_USERNAME>/unit3dprep with tags X.Y.Z, X.Y, latest.
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: read
jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker metadata (tags + labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ vars.DOCKERHUB_USERNAME }}/unit3dprep
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
# amd64 only for now. To also build arm64, change to:
# platforms: linux/amd64,linux/arm64
# (slower — arm64 builds under QEMU emulation).
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