mirror of
https://github.com/Alkatrazz24/Funk-lab.git
synced 2026-07-08 21:24:41 +02:00
* feat(finlab): console Claude Code finance in-cluster + toolkit d'analyse Intègre finlab (ex-projet Projets/Finance) au lab comme une console Claude Code web spécialisée finance — l'esprit OpenAlice, mais c'est le vrai Claude Code sur l'abonnement (login persisté, pas d'API facturée), agentique, avec la boîte à outils finlab (Yahoo Finance) branchée en MCP. - tools/finlab/ : source finlab rapatriée + Dockerfile (Python 3.12 + Node + claude-code + ttyd) + persona workspace/CLAUDE.md + branchement MCP + entrypoint (seed du workspace no-clobber sur le PVC) - .github/workflows/build-finlab.yml : build GHCR funk-finlab + bump manifest (main) - k8s/apps/finlab/ : Deployment/Service/PVC/IngressRoute (finance.lab.local) + Middleware basicAuth (shell web protégé) ; PVC = HOME (login) + workspace - k8s/apps-of-apps/apps/finlab.yaml : Application ArgoCD - .mcp.json (racine) : outils finlab dans les sessions Claude Code du lab - admin/ia/finlab.md + READMEs + CLAUDE.md : doc + enregistrement Analyse/aide à la décision uniquement — aucun ordre réel (paper trading Alpaca fictif seul exécutable). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(finlab): ttyd absent des dépôts bookworm → binaire statique GitHub Le build amont échouait (`E: Package 'ttyd' has no installation candidate`) : ttyd n'est pas packagé dans Debian bookworm. On récupère le binaire statique (musl, pin TTYD_VERSION=1.7.7) depuis les releases GitHub. Build complet validé en local (podman) : ttyd 1.7.7, claude-code 2.1.195, import finlab + seed OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
name: build-finlab
|
|
|
|
# Construit l'image de la console finance (Claude Code web + toolkit finlab), la pousse sur
|
|
# notre GHCR, et (sur main) bumpe le manifest k8s. Contrairement à OpenAlice, c'est NOTRE
|
|
# code (tools/finlab/) : pas de clone amont, pas de patch Dockerfile.
|
|
on:
|
|
push:
|
|
branches: ["main", "feat/**", "claude/**"]
|
|
paths:
|
|
- "tools/finlab/**"
|
|
- ".github/workflows/build-finlab.yml"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
IMAGE: ghcr.io/alkatrazz24/funk-finlab
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # pour committer le bump du manifest sur main
|
|
packages: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Calcule le tag (sha court) + la liste des tags
|
|
id: vars
|
|
run: |
|
|
TAG="sha-$(git rev-parse --short HEAD)"
|
|
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
|
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
|
|
echo "tags=${IMAGE}:${TAG},${IMAGE}:latest" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "tags=${IMAGE}:${TAG}" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Log in to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build & push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: tools/finlab
|
|
push: true
|
|
tags: ${{ steps.vars.outputs.tags }}
|
|
|
|
- name: Met à jour le manifest avec le tag (main uniquement)
|
|
if: github.ref == 'refs/heads/main'
|
|
run: |
|
|
sed -i "s|image: ${IMAGE}:.*|image: ${IMAGE}:${{ steps.vars.outputs.tag }}|" \
|
|
k8s/apps/finlab/deployment.yaml
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add k8s/apps/finlab/deployment.yaml
|
|
if ! git diff --staged --quiet; then
|
|
git commit -m "ci(finlab): image → ${{ steps.vars.outputs.tag }} [skip ci]"
|
|
git pull --rebase origin main
|
|
git push
|
|
fi
|