mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
27 lines
714 B
YAML
27 lines
714 B
YAML
name: CI/CD Pipeline for Backend
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build_and_push_backend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check Out Repo
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and Push Docker image for Backend
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./server
|
|
file: ./server/Dockerfile
|
|
push: true
|
|
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_BACKEND_REPO }}:latest
|