Skip to content

another try

another try #58

Workflow file for this run

name: Build and Push Docker Image to GitLab Registry
# Déclencher ce workflow lors d'un push ou d'une pull request sur les branches 'main' ou 'dev'
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout du code source
- name: Checkout code
uses: actions/checkout@v3
# Connexion au GitLab Container Registry
- name: Log in to GitLab Container Registry
uses: docker/login-action@v2
with:
registry: gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_TOKEN }}
# Construire l'image Docker
- name: Build Docker image
run: docker build -t registry.gitlab.com/${{ secrets.GITLAB_PROJECT_PATH }}/epsilonbot:${{ github.sha }} .
# Pousser l'image vers le GitLab Container Registry
- name: Push Docker image
run: docker push registry.gitlab.com/${{ secrets.GITLAB_PROJECT_PATH }}/epsilonbot:${{ github.sha }}