From b0387ed40edbc6c4d01f43669e5b60f04d2f2545 Mon Sep 17 00:00:00 2001 From: ShukeBta Date: Fri, 29 May 2026 01:13:47 +0800 Subject: [PATCH] ci: publish docker image to docker hub --- .github/workflows/docker-publish.yml | 12 ++++++------ README.md | 6 +++--- README_EN.md | 4 ++-- docker-compose.yml | 2 +- scripts/docker-build-push.ps1 | 2 +- scripts/docker-build-push.sh | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index adb9c5d..182e4cb 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -6,7 +6,6 @@ on: permissions: contents: read - packages: write jobs: docker: @@ -17,18 +16,19 @@ jobs: - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - - name: Log in to GHCR + - name: Log in to Docker Hub uses: docker/login-action@v3 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + # Configure these in GitHub repository Settings → Secrets and variables → Actions. + # DOCKERHUB_USERNAME should normally be "shukbet". + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract image metadata id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/shukebta/mediastation-go + images: shukbet/mediastationgo tags: | type=raw,value=latest type=ref,event=tag diff --git a/README.md b/README.md index 19439c4..9d6c3e9 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ MediaStationGo 采用完全开源路线,核心媒体库、刮削、播放、 | 下载联动 | qBittorrent / PT Site Adapter | 站点搜索、订阅、下载任务展示与脱敏 | | 外部兼容 | Emby-style API / DLNA | 面向外部播放器与三端客户端 | | 部署 | Docker / Docker Compose / Shell / PowerShell | NAS、Linux、Windows 均可部署 | -| CI/CD | GitHub Actions / GHCR | 仅版本标签触发多架构镜像与 Release 包发布 | +| CI/CD | GitHub Actions / Docker Hub | 仅版本标签触发多架构镜像与 Release 包发布 | --- @@ -306,7 +306,7 @@ vim docker-compose.yml services: mediastation-go: - image: ghcr.io/shukebta/mediastation-go:${MEDIASTATION_IMAGE_TAG:-latest} + image: shukbet/mediastationgo:${MEDIASTATION_IMAGE_TAG:-latest} pull_policy: always container_name: mediastation-go restart: unless-stopped @@ -910,7 +910,7 @@ PT 下载 URL 常包含私有 Token。下载中心和订阅管理会主动隐藏 ### Q: 可以只保留哪个 Docker 包? -保留 `ghcr.io/shukebta/mediastation-go` 即可;旧的 `mediastationgo` 包可以删除,避免用户拉错镜像。 +以后统一使用 Docker Hub 镜像 `shukbet/mediastationgo`;旧的 `ghcr.io/shukebta/mediastation-go` / `mediastationgo` 包可以删除或归档,避免用户拉错镜像。 --- diff --git a/README_EN.md b/README_EN.md index 68dfa63..254a132 100644 --- a/README_EN.md +++ b/README_EN.md @@ -170,7 +170,7 @@ The current base license is `GPL-3.0`, and contributions are welcome under that | Downloads | qBittorrent / PT site adapters | Search, subscriptions, task cards, private URL redaction | | Compatibility | Emby-style API / DLNA | External clients and player integrations | | Deployment | Docker / Docker Compose / Shell / PowerShell | NAS, Linux, Windows, and macOS friendly | -| CI/CD | GitHub Actions / GHCR | Multi-arch Docker images and release packages only on version tags | +| CI/CD | GitHub Actions / Docker Hub | Multi-arch Docker images and release packages only on version tags | --- @@ -780,7 +780,7 @@ PT download URLs often include private tokens. Download and subscription views i ### Which Docker package should be kept? -Keep `ghcr.io/shukebta/mediastation-go`. The old `mediastationgo` package can be removed to avoid users pulling the wrong image. +Use `shukbet/mediastationgo` on Docker Hub. The old `ghcr.io/shukebta/mediastation-go` / `mediastationgo` packages can be removed or archived to avoid users pulling the wrong image. --- diff --git a/docker-compose.yml b/docker-compose.yml index 235a4a7..db8562e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ services: mediastation-go: - image: ghcr.io/shukebta/mediastation-go:${MEDIASTATION_IMAGE_TAG:-latest} + image: shukbet/mediastationgo:${MEDIASTATION_IMAGE_TAG:-latest} pull_policy: always container_name: mediastation-go restart: unless-stopped diff --git a/scripts/docker-build-push.ps1 b/scripts/docker-build-push.ps1 index a7e15ee..8141747 100644 --- a/scripts/docker-build-push.ps1 +++ b/scripts/docker-build-push.ps1 @@ -1,5 +1,5 @@ param( - [string]$Image = "ghcr.io/shukebta/mediastation-go", + [string]$Image = "shukbet/mediastationgo", [string]$Tag = "latest", [string]$Platforms = "linux/amd64,linux/arm64", [switch]$Load diff --git a/scripts/docker-build-push.sh b/scripts/docker-build-push.sh index 04f7a73..7f56073 100644 --- a/scripts/docker-build-push.sh +++ b/scripts/docker-build-push.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -IMAGE="${IMAGE:-ghcr.io/shukebta/mediastation-go}" +IMAGE="${IMAGE:-shukbet/mediastationgo}" TAG="${TAG:-latest}" PLATFORMS="${PLATFORMS:-linux/amd64,linux/arm64}" PUSH="${PUSH:-1}"