feat: initial ray-serve-apps PyPI package
Implements ADR-0024: Ray Repository Structure - Ray Serve deployments for GPU-shared AI inference - Published as PyPI package for dynamic code loading - Deployments: LLM, embeddings, reranker, whisper, TTS - CI/CD workflow publishes to Gitea PyPI on push to main Extracted from kuberay-images repo per ADR-0024
This commit is contained in:
89
.gitea/workflows/publish.yaml
Normal file
89
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,89 @@
|
||||
name: Build and Publish ray-serve-apps
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'ray_serve/**'
|
||||
- 'pyproject.toml'
|
||||
- '.gitea/workflows/publish.yaml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'ray_serve/**'
|
||||
- 'pyproject.toml'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
NTFY_URL: http://ntfy.observability.svc.cluster.local:80
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install ruff
|
||||
run: pip install ruff
|
||||
|
||||
- name: Lint with ruff
|
||||
run: |
|
||||
ruff check .
|
||||
ruff format --check .
|
||||
|
||||
publish:
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install build tools
|
||||
run: pip install build twine
|
||||
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
|
||||
- name: Publish to Gitea PyPI
|
||||
env:
|
||||
TWINE_USERNAME: ${{ secrets.REGISTRY_USER }}
|
||||
TWINE_PASSWORD: ${{ secrets.REGISTRY_TOKEN }}
|
||||
TWINE_REPOSITORY_URL: http://gitea-http.gitea.svc.cluster.local:3000/api/packages/daviestechlabs/pypi
|
||||
run: |
|
||||
if [ -z "$TWINE_USERNAME" ] || [ -z "$TWINE_PASSWORD" ]; then
|
||||
echo "ERROR: REGISTRY_USER or REGISTRY_TOKEN secrets not set"
|
||||
exit 1
|
||||
fi
|
||||
python -m twine upload --verbose dist/*
|
||||
|
||||
- name: Notify on success
|
||||
if: success()
|
||||
run: |
|
||||
curl -s -X POST "${{ env.NTFY_URL }}/gitea-ci" \
|
||||
-H "Title: ray-serve-apps published" \
|
||||
-H "Priority: default" \
|
||||
-H "Tags: package,white_check_mark" \
|
||||
-d "Published ray-serve-apps to Gitea PyPI"
|
||||
|
||||
- name: Notify on failure
|
||||
if: failure()
|
||||
run: |
|
||||
curl -s -X POST "${{ env.NTFY_URL }}/gitea-ci" \
|
||||
-H "Title: ray-serve-apps publish failed" \
|
||||
-H "Priority: high" \
|
||||
-H "Tags: package,x" \
|
||||
-d "Failed to publish ray-serve-apps to Gitea PyPI"
|
||||
Reference in New Issue
Block a user