Skip to content

feat: add docker-compose file and modified A2_Part1.yml file #1

feat: add docker-compose file and modified A2_Part1.yml file

feat: add docker-compose file and modified A2_Part1.yml file #1

Workflow file for this run

name: Build Docker Image | CI Pipeline
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build_and_push_docker_image:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build the Docker images
run: docker-compose build
- name: Tag and push the Docker images
run: |
docker tag cscc01-linkup_frontend:latest ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_frontend:latest
docker tag cscc01-linkup_backend:latest ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_backend:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_frontend:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_backend:latest
- name: List Docker images
run: docker images