docs: add /admin console section to README.fr.md #42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI — Build & Push | |
| # Déclencheurs : | |
| # - push sur n'importe quelle branche → image taguée avec le nom de branche | |
| # - push d'un tag v* → image taguée vX.Y.Z + vX.Y + latest | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags: | |
| - "v*" | |
| env: | |
| REGISTRY: ghcr.io | |
| # github.repository → "cloud-temple/live-memory" | |
| # Image finale → ghcr.io/cloud-temple/live-memory:<tag> | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| # ───────────────────────────────────────────────────────────────────────── | |
| # Job 1 — Tests Python (uv + pytest) | |
| # ───────────────────────────────────────────────────────────────────────── | |
| test: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies (dev) | |
| run: uv sync --dev | |
| - name: Run tests | |
| run: uv run pytest tests/ -v | |
| # ───────────────────────────────────────────────────────────────────────── | |
| # Job 2 — Build multi-arch + push GHCR | |
| # | |
| # Stratégie de tags automatique (via docker/metadata-action) : | |
| # - branche main → ghcr.io/cloud-temple/live-memory:main | |
| # - branche dev → ghcr.io/cloud-temple/live-memory:dev | |
| # - branche feature/xx → ghcr.io/cloud-temple/live-memory:feature-xx | |
| # - tag v1.7.0 → ghcr.io/cloud-temple/live-memory:1.7.0 :1.7 :latest | |
| # ───────────────────────────────────────────────────────────────────────── | |
| build: | |
| name: Build & Push Docker Image | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| contents: read | |
| packages: write # Requis pour pousser vers GHCR | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Multi-arch : amd64 natif + arm64 via QEMU (Mac M-series, Pi, etc.) | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| # Authentification GHCR — GITHUB_TOKEN suffit, aucun secret à configurer | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Génération automatique des tags et labels OCI | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| # Branches → tag avec le nom de branche (main, dev, feature-xxx, …) | |
| type=ref,event=branch | |
| # Tags semver → version complète (ex: v1.7.0 → 1.7.0) | |
| type=semver,pattern={{version}} | |
| # Tags semver → major.minor (ex: v1.7.0 → 1.7) | |
| type=semver,pattern={{major}}.{{minor}} | |
| # :latest uniquement sur les tags vX.Y.Z (pas sur les branches) | |
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} | |
| - name: Build and Push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64/v8 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| # Cache BuildKit via GitHub Actions Cache → rebuilds ~3× plus rapides | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |