- Replace type=gha cache (broken on Gitea: unparseable runtime token) with type=registry cache using image-manifest/oci-mediatypes options that the Gitea registry accepts. - Push with a Gitea PAT (REGISTRY_TOKEN) since the auto job token cannot publish OCI images to the package repo. - Add registry login to the CI docker smoke-test job.
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
cache: pip
|
|
- run: pip install ruff
|
|
- run: ruff check src/
|
|
- run: ruff format --check src/
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
cache: pip
|
|
- run: pip install -r requirements.txt
|
|
- name: Verify imports
|
|
run: python -c "from src.server import mcp; print('OK:', mcp.name)"
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
needs: [lint, build]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: git.soconnor.dev
|
|
username: ${{ gitea.repository_owner }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
- uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: false
|
|
tags: poke-mail:test
|
|
cache-from: type=registry,ref=git.soconnor.dev/soconnor/poke-mail:buildcache
|