Files
Jyotisha/.github/workflows/docker-publish.yml
T
732642856 5150f0d99a v6.9.7: PyPI + Docker 工程化 — pip install + docker compose up 一键部署
feat(pypi): publish-pypi.yml workflow (tag-triggered, OIDC trusted publishing)
feat(docker): Dockerfile + docker-compose.yml (API :5200 + Web :5300)
feat(ci): docker-publish.yml workflow (ghcr.io, tag-triggered)
chore: version unified to v6.9.6 (pyproject/__init__/SKILL/README)
chore: MANIFEST.in + scripts/__init__.py for pip install support
chore: pyproject.toml updated packages.find to include scripts/
chore: README.md status section refreshed, P0/P1 updated

Verified: wheel build + twine check PASSED, pip install + import OK
2026-06-12 18:50:39 +08:00

53 lines
1.2 KiB
YAML

name: Build & Push Docker Image
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
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 }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=branch
type=sha,format=short
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max