Responsiveness #1
Workflow file for this run
This file contains 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: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- test6 # Déclenche le workflow sur chaque push vers la branche "main" | |
pull_request: | |
branches: | |
- test6 # Déclenche sur un PR vers "main" (si besoin) | |
jobs: | |
build: | |
runs-on: ubuntu-latest # Utilise une machine virtuelle Ubuntu pour construire l'image | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v2 # Clone le code du repo | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 # Configure Buildx, l'outil pour construire l'image | |
- name: Cache Docker layers | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} # Nom d'utilisateur Docker Hub | |
password: ${{ secrets.DOCKER_PASSWORD }} # Mot de passe Docker Hub (stocké dans les secrets GitHub) | |
- name: Build and push Docker image | |
run: | | |
docker build -t tiritibambix/imagemagicksimplegui:test6 . | |
docker push tiritibambix/imagemagicksimplegui:test6 | |
# Construire et pousser l'image vers Docker Hub | |
- name: Logout from Docker Hub | |
run: docker logout # Se déconnecter de Docker Hub après avoir poussé l'image | |
# |