diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 182e4cb..adb9c5d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -6,6 +6,7 @@ on: permissions: contents: read + packages: write jobs: docker: @@ -16,19 +17,18 @@ jobs: - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub + - name: Log in to GHCR uses: docker/login-action@v3 with: - # Configure these in GitHub repository Settings → Secrets and variables → Actions. - # DOCKERHUB_USERNAME should normally be "shukbet". - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Extract image metadata id: meta uses: docker/metadata-action@v5 with: - images: shukbet/mediastationgo + images: ghcr.io/shukebta/mediastation-go tags: | type=raw,value=latest type=ref,event=tag diff --git a/README.md b/README.md index 9d6c3e9..19439c4 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 / Docker Hub | 仅版本标签触发多架构镜像与 Release 包发布 | +| CI/CD | GitHub Actions / GHCR | 仅版本标签触发多架构镜像与 Release 包发布 | --- @@ -306,7 +306,7 @@ vim docker-compose.yml services: mediastation-go: - image: shukbet/mediastationgo:${MEDIASTATION_IMAGE_TAG:-latest} + image: ghcr.io/shukebta/mediastation-go:${MEDIASTATION_IMAGE_TAG:-latest} pull_policy: always container_name: mediastation-go restart: unless-stopped @@ -910,7 +910,7 @@ PT 下载 URL 常包含私有 Token。下载中心和订阅管理会主动隐藏 ### Q: 可以只保留哪个 Docker 包? -以后统一使用 Docker Hub 镜像 `shukbet/mediastationgo`;旧的 `ghcr.io/shukebta/mediastation-go` / `mediastationgo` 包可以删除或归档,避免用户拉错镜像。 +保留 `ghcr.io/shukebta/mediastation-go` 即可;旧的 `mediastationgo` 包可以删除,避免用户拉错镜像。 --- diff --git a/README_EN.md b/README_EN.md index 254a132..68dfa63 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 / Docker Hub | Multi-arch Docker images and release packages only on version tags | +| CI/CD | GitHub Actions / GHCR | 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? -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. +Keep `ghcr.io/shukebta/mediastation-go`. The old `mediastationgo` package can be removed to avoid users pulling the wrong image. --- diff --git a/docker-compose.yml b/docker-compose.yml index db8562e..235a4a7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,7 @@ services: mediastation-go: - image: shukbet/mediastationgo:${MEDIASTATION_IMAGE_TAG:-latest} + image: ghcr.io/shukebta/mediastation-go:${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 8141747..a7e15ee 100644 --- a/scripts/docker-build-push.ps1 +++ b/scripts/docker-build-push.ps1 @@ -1,5 +1,5 @@ param( - [string]$Image = "shukbet/mediastationgo", + [string]$Image = "ghcr.io/shukebta/mediastation-go", [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 7f56073..04f7a73 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:-shukbet/mediastationgo}" +IMAGE="${IMAGE:-ghcr.io/shukebta/mediastation-go}" TAG="${TAG:-latest}" PLATFORMS="${PLATFORMS:-linux/amd64,linux/arm64}" PUSH="${PUSH:-1}"