From 18efafdc81551959943585c9183f76104b36f798 Mon Sep 17 00:00:00 2001 From: Praneeth <89689768+praneeth622@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:37:01 +0000 Subject: [PATCH] Created deploy.yml for Docker CD pipeline --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..9c02271 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +name : Build and Deploy to Docker Hub + +on : [push] + +jobs: + build: + name : Deploy to Docker + runs-on : ubuntu-latest + + steps : + - name : Checkout repository + uses : actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name : Log in to Docker Hub + run : docker/login-action@v1 + with : + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name : Build and Push Docker image + uses : docker/build-push-action@v2 + with : + content : . + file: ./Dockerfile + push: true + tags: praneeth0331/dropit:latest + + - name : Verify Pushed Image + run : docker pull praneeth0331/dropit:latest +