diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9294e5c..3a80603 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,7 +7,8 @@ on: workflow_dispatch: jobs: - push-store-image: + push-to-ghcr: + name: Push Docker image to GHCR runs-on: ubuntu-latest steps: @@ -25,4 +26,32 @@ jobs: run: docker build . --tag ghcr.io/hemantapkh/torrenthunt:latest - name: 'Push to GHCR' - run: docker push ghcr.io/hemantapkh/torrenthunt:latest \ No newline at end of file + run: docker push ghcr.io/hemantapkh/torrenthunt:latest + + push-to-docker-hub: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: hemantapkh/torrenthunt + + - name: Build and push Docker image + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: . + file: ./Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file