Skip to content

Commit

Permalink
Push to docker hub
Browse files Browse the repository at this point in the history
  • Loading branch information
hemantapkh committed Jan 25, 2024
1 parent cca6a73 commit 741f2ea
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
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 }}

0 comments on commit 741f2ea

Please sign in to comment.