Merge branch 'master' of https://github.com/Vaibhavvv24/Ketan_Stores #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CICD for Food Project Frontend | |
on: | |
push: | |
branches: [master] | |
paths: | |
- backend/ketanStores/** | |
pull_request: | |
branches: [master] | |
paths: | |
- backend/ketanStores/** | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: maven | |
- name: Build with Maven | |
run: | | |
cd backend/ketanStores | |
mvn clean install -DskipTests | |
- name: Log files in pwd | |
run: ls -al | |
- name: Build image and push to docker hub | |
uses: mr-smithers-excellent/docker-build-push@v6 | |
with: | |
image: valmikdocker/ketan_stores | |
tags: backend | |
registry: docker.io | |
directory: backend/ketanStores | |
dockerfile: backend/ketanStores/Dockerfile | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
# deploy: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# if: ${{ success() }} | |
# steps: | |
# - name: executing the remote ssh commands | |
# uses: appleboy/[email protected] | |
# with: | |
# script: | | |
# cd backendRestraunt | |
# docker compose pull | |
# docker image ls | |
# docker compose up -d | |
# docker ps -a |