Skip to content

Commit

Permalink
Added docker automation in docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KrishDave1 authored Nov 16, 2024
1 parent de3a21a commit ded7fe5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ jobs:
include-hidden-files: true
if-no-files-found: warn

# Step 6: Build and Push Docker Image
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker Image
run: |
IMAGE_NAME=${{ secrets.DOCKER_IMAGE_NAME }}:$(date +%s)
docker build -t $IMAGE_NAME .
docker push $IMAGE_NAME
deploy:
runs-on: ubuntu-latest
needs: build
Expand Down

0 comments on commit ded7fe5

Please sign in to comment.