diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 9f9edd1..c110b24 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,13 +1,15 @@ name: Publish Docker Image on: - push: - tags: - - '[0-9][0-9][0-9][0-9].[0-9]*.[0-9]*' + push: + tags: + - '[0-9][0-9][0-9][0-9].[0-9][0-9].[0-9][0-9]' + branches: + - main env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + REGISTRY: docker.io + IMAGE_NAME: sillyangel/mice jobs: push_to_registry: @@ -21,12 +23,11 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 - - name: Login to GitHub Container Registry + - name: Login to Docker Hub uses: docker/login-action@v3 with: - registry: ${{ env.REGISTRY }} - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up Node.js uses: actions/setup-node@v4 @@ -40,14 +41,19 @@ jobs: echo "version=$VERSION" >> "$GITHUB_OUTPUT" - name: Docker metadata (tags, labels) - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }} - type=raw,value=${{ steps.app_version.outputs.version }} - type=raw,value=${{ github.sha }} + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest,enable=${{ github.ref_name == 'main' }} + type=raw,value=${{ steps.app_version.outputs.version }},enable=${{ startsWith(github.ref, 'refs/tags/') }} + type=raw,value=${{ github.ref_name }},enable=${{ startsWith(github.ref, 'refs/tags/') }} + type=sha + labels: | + org.opencontainers.image.created=${{ github.event.head_commit.timestamp }} + org.opencontainers.image.licenses=MIT + - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -72,6 +78,6 @@ jobs: - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} + subject-name: ${{ env.IMAGE_NAME }} subject-digest: ${{ steps.build.outputs.digest }} push-to-registry: true diff --git a/DOCKER.md b/DOCKER.md index 6c61fdb..ecaec19 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -8,7 +8,7 @@ This application can be easily deployed using Docker with configurable environme ```bash # Run using pre-built image (app will prompt for Navidrome config) -docker run -p 3000:3000 ghcr.io/sillyangel/mice:latest +docker run -p 3000:3000 sillyangel/mice:latest # Or build locally docker build -t mice . @@ -20,7 +20,7 @@ docker run -p 3000:3000 \ -e NEXT_PUBLIC_NAVIDROME_USERNAME=your_username \ -e NEXT_PUBLIC_NAVIDROME_PASSWORD=your_password \ -e PORT=3000 \ - ghcr.io/sillyangel/mice:latest + sillyangel/mice:latest ``` ### Using Docker Compose @@ -43,7 +43,7 @@ docker run -p 3000:3000 \ docker-compose up -d ``` -**Note**: The default docker-compose.yml uses the pre-built image `ghcr.io/sillyangel/mice:latest`. +**Note**: The default docker-compose.yml uses the pre-built image `sillyangel/mice:latest`. For local development, you can use the override example: @@ -86,7 +86,7 @@ For local development (non-Docker), use these variable names: ```bash # Using pre-built image - app will ask for Navidrome server details on first launch -docker run -p 3000:3000 ghcr.io/sillyangel/mice:latest +docker run -p 3000:3000 sillyangel/mice:latest # Or build locally docker build -t mice . @@ -100,7 +100,7 @@ docker run -p 3000:3000 \ -e NEXT_PUBLIC_NAVIDROME_URL=http://localhost:4533 \ -e NEXT_PUBLIC_NAVIDROME_USERNAME=admin \ -e NEXT_PUBLIC_NAVIDROME_PASSWORD=admin \ - ghcr.io/sillyangel/mice:latest + sillyangel/mice:latest ``` ### Pre-configured Production Setup @@ -112,7 +112,7 @@ docker run -p 80:3000 \ -e NEXT_PUBLIC_NAVIDROME_PASSWORD=your_secure_password \ -e PORT=3000 \ --restart unless-stopped \ - ghcr.io/sillyangel/mice:latest + sillyangel/mice:latest ``` ### Using Environment File diff --git a/GITHUB_ACTIONS.md b/GITHUB_ACTIONS.md index 8708de4..202f8ef 100644 --- a/GITHUB_ACTIONS.md +++ b/GITHUB_ACTIONS.md @@ -1,13 +1,13 @@ # GitHub Actions Docker Publishing Setup -This repository includes a GitHub Actions workflow that automatically builds and publishes Docker images to GitHub Container Registry (GHCR). +This repository includes a GitHub Actions workflow that automatically builds and publishes Docker images to Docker Hub. ## Workflow Overview The workflow (`/.github/workflows/publish-docker.yml`) automatically: 1. **Builds** the Docker image using multi-platform support (AMD64 and ARM64) -2. **Publishes** to `ghcr.io/sillyangel/mice` +2. **Publishes** to `sillyangel/mice` 3. **Tags** images appropriately based on git refs 4. **Caches** layers for faster subsequent builds 5. **Generates** build provenance attestations for security @@ -27,16 +27,16 @@ Based on different triggers, the workflow creates these tags: ### Main Branch Push -- `ghcr.io/sillyangel/mice:latest` +- `sillyangel/mice:latest` ### Tag Push (e.g., `2025.07.02`) -- `ghcr.io/sillyangel/mice:2025.07.02` -- `ghcr.io/sillyangel/mice:latest` +- `sillyangel/mice:2025.07.02` +- `sillyangel/mice:latest` ### Pull Request -- `ghcr.io/sillyangel/mice:pr-123` +- `sillyangel/mice:pr-123` ## Multi-Platform Support @@ -51,7 +51,7 @@ Once the workflow is set up: 1. **Push to main** → New `latest` image published 2. **Create a release** → Versioned images published -3. **Users can pull**: `docker pull ghcr.io/sillyangel/mice:latest` +3. **Users can pull**: `docker pull sillyangel/mice:latest` ## Manual Image Building @@ -60,9 +60,9 @@ You can also build and push manually: ```bash # Build for multiple platforms docker buildx build --platform linux/amd64,linux/arm64 \ - -t ghcr.io/sillyangel/mice:latest \ + -t sillyangel/mice:latest \ --push . # Login first (if needed) -echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin +echo $DOCKERHUB_TOKEN | docker login -u USERNAME --password-stdin ``` diff --git a/README.md b/README.md index ef25259..8479671 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

Mice Logo - Mice | Navidrome Client + Mice | Navidrome Client

# @@ -91,7 +91,7 @@ For easy deployment using Docker: ```bash # Run using pre-built image (app will prompt for Navidrome configuration) -docker run -p 3000:3000 ghcr.io/sillyangel/mice:latest +docker run -p 3000:3000 sillyangel/mice:latest # Or build locally docker build -t mice . @@ -114,7 +114,7 @@ docker run -p 3000:3000 \ -e NEXT_PUBLIC_NAVIDROME_URL=http://your-navidrome-server:4533 \ -e NEXT_PUBLIC_NAVIDROME_USERNAME=your_username \ -e NEXT_PUBLIC_NAVIDROME_PASSWORD=your_password \ - ghcr.io/sillyangel/mice:latest + sillyangel/mice:latest ``` 📖 **For detailed Docker configuration, environment variables, troubleshooting, and advanced setups, see [DOCKER.md](./DOCKER.md)** diff --git a/app/components/start-screen.tsx b/app/components/start-screen.tsx index f2ffb16..bc648bf 100644 --- a/app/components/start-screen.tsx +++ b/app/components/start-screen.tsx @@ -399,6 +399,28 @@ export function LoginForm({ required /> + + {/* Demo Server Tip */} +
+
+
+ 💡 +
+
+

+ Don't have a Navidrome server? +

+

+ Try the demo server to explore mice: +

+
+
URL: https://demo.navidrome.org
+
Username: demo
+
Password: demo
+
+
+
+