From a30957cd29a896278696a55ad6aab38c7d7038bc Mon Sep 17 00:00:00 2001 From: Xavier Date: Tue, 6 Oct 2026 23:53:13 +0200 Subject: [PATCH] ajout runner github --- .github/workflows/docker.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..92f0c9d --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,34 @@ +name: Build and Publish Docker Image + +on: + push: + branches: [ "main" ] # Modifiez si votre branche s'appelle "master" + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write # Indispensable pour publier le paquet sur le dépôt + + steps: + - name: Checkout du code + uses: actions/checkout@v4 + + - name: Connexion au registre GitHub (ghcr.io) + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Construction et publication de l'image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \ No newline at end of file