Merge pull request #44 from louis-antoine-etsmtl/dev-staging

create dev images on dev push
This commit is contained in:
louis-antoine-etsmtl 2024-04-07 13:16:52 -04:00 committed by GitHub
commit c15890966b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,26 @@
name: CI/CD Pipeline for Backend
on:
push:
branches: [ dev ]
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 }}/dev_${{ secrets.DOCKERHUB_BACKEND_REPO }}:latest

26
.github/workflows/dev_deploy.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: CI/CD Pipeline for Nginx Router
on:
push:
branches: [ dev ]
jobs:
build_and_push_nginx:
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 Router
uses: docker/build-push-action@v2
with:
context: ./nginx
file: ./nginx/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev_${{ secrets.DOCKERHUB_ROUTER_REPO }}:latest

View file

@ -0,0 +1,26 @@
name: CI/CD Pipeline for Frontend
on:
push:
branches: [ dev ]
jobs:
build_and_push_frontend:
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 Frontend
uses: docker/build-push-action@v2
with:
context: ./client
file: ./client/Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/dev_${{ secrets.DOCKERHUB_FRONTEND_REPO }}:latest