readme fix #15
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
| # ───────────────────────────────────────────────────────────────── | |
| # .github/workflows/docker-deploy.yml | |
| # Pipeline CI/CD — conforme au cours ENSAE "Mise en production" | |
| # | |
| # Reproduit exactement le schéma du cours : | |
| # push sur une branche → build image Docker → push sur Docker Hub | |
| # | |
| # Secrets GitHub à configurer : | |
| # DOCKERHUB_USERNAME : votre identifiant Docker Hub | |
| # DOCKERHUB_TOKEN : Access Token Docker Hub | |
| # (hub.docker.com → Account Settings → Security) | |
| # ───────────────────────────────────────────────────────────────── | |
| name: Build & Deploy FastCrowdVision | |
| on: | |
| push: | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ secrets.DOCKERHUB_USERNAME }}/fastcrowdvision | |
| tags: | | |
| type=ref,event=branch | |
| type=semver,pattern={{version}} | |
| type=sha,prefix=sha-,format=short | |
| type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |