Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🚀 Build and Publish RetroIPTVGuide to GHCR
name: 🚀 Build and Publish RetroIPTVGuide to GHCR and Docker Hub

on:
push:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: 🏗️ Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: 🧱 Build and Push Docker image
- name: 🧱 Build and Push Docker image to GHCR
uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -57,6 +57,22 @@ jobs:
- name: 🧹 Cleanup local images
run: docker image prune -af || true

- name: 🐳 Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 📦 Push image to Docker Hub
run: |
echo "🧭 Tagging image for Docker Hub..."
docker tag ghcr.io/thehack904/retroiptvguide:latest thehack904/retroiptvguide:latest
docker tag ghcr.io/thehack904/retroiptvguide:${{ github.ref_name }} thehack904/retroiptvguide:${{ github.ref_name }}
echo "🚀 Pushing images to Docker Hub..."
docker push thehack904/retroiptvguide:latest
docker push thehack904/retroiptvguide:${{ github.ref_name }}
echo "✅ Docker Hub push complete."

cleanup-ghcr:
name: 🧽 Cleanup old GHCR images
runs-on: ubuntu-latest
Expand Down