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 +