Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ jobs:
echo "Response: $response"
exit 1
fi

- name: Generate OpenAPI spec
run: |
# Download OpenAPI spec
curl -s http://localhost:8000/openapi.json -o memoryalpha-rag-api-spec.json
cat memoryalpha-rag-api-spec.json

- name: Cleanup
if: always()
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ jobs:
echo "Response: $response"
exit 1
fi

- name: Generate OpenAPI spec
run: |
# Download OpenAPI spec
curl -s http://localhost:8000/openapi.json -o memoryalpha-rag-api-spec.json
cat memoryalpha-rag-api-spec.json

- name: Cleanup
if: always()
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
release:
types: [published]

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -48,3 +52,19 @@ jobs:
repository: ${{ secrets.DOCKER_USERNAME }}/memoryalpha-rag-api
short-description: "REST API for RAG over Star Trek MemoryAlpha database using Ollama"
readme-filepath: ./README.md

- name: Generate OpenAPI spec
run: |
docker compose up -d lcars
# Wait for API to be ready
timeout 120 bash -c 'until curl -f http://localhost:8000/memoryalpha/health > /dev/null 2>&1; do sleep 5; echo "Waiting for API..."; done'
# Download OpenAPI spec
curl -s http://localhost:8000/openapi.json -o memoryalpha-rag-api-spec.json
docker compose down -v

- name: Upload OpenAPI spec to release
uses: softprops/action-gh-release@v2
with:
files: memoryalpha-rag-api-spec.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}