yavsc/.github/workflows/docker-publish-backend.yml
Paul Schneider b5fa7b9072
All checks were successful
Dotnet build and test / build (pull_request) Successful in 26m40s
Dotnet build and test / build (push) Successful in 26m24s
Github tests
2026-10-11 02:26:31 +01:00

41 lines
1.2 KiB
YAML

name: Build and Push Yavsc Production Image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
production-deploy:
runs-on: ubuntu-latest
steps:
# 1. Récupération du code
- name: Check out the repo
uses: actions/checkout@v7
# 2. Configuration du moteur de Buildx pour les builds multi-plateformes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
# 3. Connexion sécurisée à Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Test
run: dotnet test --report-xunit --report-xunit-html --results-directory "test-reports"
# 4. Build et Push de l'image de production finale
- name: Build and push production image
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile.backend
push: true
tags: |
pazof/yavsc:latest
pazof/yavsc:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max