From 6c9101007b5190654911ce19a40fc2e929b37cc3 Mon Sep 17 00:00:00 2001 From: dheeraj Date: Thu, 30 Oct 2025 19:01:58 +0530 Subject: [PATCH 1/4] allnew --- .github/workflows/integration.yml | 68 ++++++++++++------------------- 1 file changed, 25 insertions(+), 43 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8a2fa081..b4c01293 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,51 +1,33 @@ - -name: Integration +name: CI Pipeline on: push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + branches: + - ajay jobs: - build: - + build-and-test: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - name: "Installing Dependencies" - run: npm i - - - name: "Build command" - run: npm run build - - unit-tests: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x, 20.x, 22.x] - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - name: "Installing Dependencies" - run: npm i - - - name: "Running test cases" - run: npm run test \ No newline at end of file + # Step 1: Checkout code + - name: Checkout Repository + uses: actions/checkout@v3 + + # Step 2: Set up Node.js (change version if needed) + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + # Step 3: Install dependencies + - name: Install Dependencies + run: npm install + + # Step 4: Build the application + - name: Build Application + run: npm run build + + # Step 5: Run tests + - name: Run Tests + run: npm test From e60305178cdef9a0c98fe47d11c41e678d9a8b1e Mon Sep 17 00:00:00 2001 From: dheeraj Date: Thu, 30 Oct 2025 19:06:47 +0530 Subject: [PATCH 2/4] allnew --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b4c01293..fb233c39 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -24,7 +24,7 @@ jobs: - name: Install Dependencies run: npm install - # Step 4: Build the application + # Step 4: Build the applicatio - name: Build Application run: npm run build From ab73cea6886082f591029cb6c55d61c13dcbde52 Mon Sep 17 00:00:00 2001 From: dheeraj Date: Thu, 30 Oct 2025 19:11:11 +0530 Subject: [PATCH 3/4] added deploy --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 35fe7716..7766d60d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,18 +1,36 @@ - -name: Deploy +name: Build and Push Docker Image on: push: - branches: [ "main" ] + branches: + - ajay # Trigger only on push to this branch jobs: - deploy: - + build-and-push: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: docker build . -t harishneel/next-js-app - - run: echo "${{secrets.DOCKERHUB_PASSWORD}}" | docker login -u ${{secrets.DOCKERHUB_USERNAME}} --password-stdin - - run: docker push harishneel/next-js-app:latest \ No newline at end of file + # Step 1: Checkout the code + - name: Checkout repository + uses: actions/checkout@v3 + + # Step 2: Set up Docker Buildx (for multi-platform builds if needed) + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Step 3: Login to DockerHub + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + # Step 4: Build Docker image + - name: Build Docker image + run: | + docker build . -t ${{ secrets.DOCKERHUB_USERNAME }}/kamlesh:satpal + + # Step 5: Push Docker image to DockerHub + - name: Push Docker image + run: | + docker push ${{ secrets.DOCKERHUB_USERNAME }}/kamlesh:satpal \ No newline at end of file From 285b137a6b3da20aff2f120ea7b3a96da9834908 Mon Sep 17 00:00:00 2001 From: dheeraj Date: Thu, 30 Oct 2025 19:26:56 +0530 Subject: [PATCH 4/4] do changes in dheeraj branch --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7766d60d..400393bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,4 +33,4 @@ jobs: # Step 5: Push Docker image to DockerHub - name: Push Docker image run: | - docker push ${{ secrets.DOCKERHUB_USERNAME }}/kamlesh:satpal \ No newline at end of file + docker push ${{ secrets.DOCKERHUB_USERNAME }}/kamlesh:satpa \ No newline at end of file