ajout runner github
Build and Push Docker Image / build-and-push (push) Successful in 37s

This commit is contained in:
xavier committed 2026-10-06 23:53:13 +02:00
1 parent e8aaf8587b
commit a30957cd29
1 file changed
+34
+34
View File
@@ -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