EvalueTonSavoir/.github/workflows/backend-deploy.yml
2024-04-05 16:16:02 -04:00

26 lines
698 B
YAML

name: CI/CD Pipeline for Backend
on:
push:
branches: [ pipeline ]
jobs:
build_and_push_backend:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker image for Backend
uses: docker/build-push-action@v2
with:
context: ./server
file: ./server/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_BACKEND_REPO }}:latest