This document explains how to set up the GitHub Actions workflow to automatically build and publish Docker images to Docker Hub.
- Docker Hub Account: You need a Docker Hub account
- GitHub Repository: Your code should be in a GitHub repository
- Docker Hub Repository: Create a repository named
karaoke-for-jellyfinon Docker Hub
- Log into Docker Hub
- Go to Account Settings → Security
- Click New Access Token
- Give it a name (e.g., "GitHub Actions")
- Select Read, Write, Delete permissions
- Click Generate
- Copy the token immediately (you won't be able to see it again)
- Go to your GitHub repository
- Click Settings → Secrets and variables → Actions
- Click New repository secret
- Add the following secrets:
| Secret Name | Value | Description |
|---|---|---|
DOCKERHUB_USERNAME |
mrorbitman |
Your Docker Hub username |
DOCKERHUB_TOKEN |
your_access_token |
The access token from Step 1 |
- Click New repository secret
- Enter the Name (e.g.,
DOCKERHUB_USERNAME) - Enter the Secret value
- Click Add secret
- Repeat for each secret
The workflow file .github/workflows/docker-publish.yml is already configured to:
-
Trigger on:
- Push to
mainormasterbranch - New tags (e.g.,
v1.0.0) - Pull requests (build only, no push)
- Manual workflow dispatch
- Push to
-
Build for multiple architectures:
linux/amd64(Intel/AMD 64-bit)linux/arm64(ARM 64-bit, including Apple Silicon)
-
Tag strategy:
latestfor main branch- Version tags for releases (e.g.,
v1.0.0,v1.0,v1) - Branch names for feature branches
git add .
git commit -m "feat: add Docker Hub publishing workflow"
git push origin maingit tag v1.0.0
git push origin v1.0.0- Go to your GitHub repository
- Click Actions tab
- Select Build and Push Docker Image workflow
- Click Run workflow
- Choose the branch and click Run workflow
- Go to the Actions tab in your GitHub repository
- Click on the running workflow
- Monitor the build progress
- Check for any errors in the logs
- Go to Docker Hub
- Navigate to your repository:
mrorbitman/karaoke-for-jellyfin - Verify the image was pushed successfully
- Check that the README was updated automatically
The workflow builds for both AMD64 and ARM64 architectures, making it compatible with:
- Intel/AMD servers and desktops
- ARM-based systems (including Raspberry Pi, Apple Silicon Macs)
The workflow uses GitHub Actions cache to speed up builds by caching Docker layers.
- Secrets are never exposed in logs
- Only pushes images on main branch and tags (not on pull requests)
- Uses official GitHub Actions for security
The workflow automatically updates the Docker Hub repository description with the contents of README-DOCKERHUB.md.
-
Authentication Failed
- Verify
DOCKERHUB_USERNAMEandDOCKERHUB_TOKENsecrets are correct - Ensure the access token has the right permissions
- Verify
-
Build Fails
- Check the Dockerfile syntax
- Verify all dependencies are available
- Check the build logs for specific errors
-
Multi-arch Build Issues
- Some dependencies might not support all architectures
- Check if base images support the target architecture
-
README Not Updated
- Verify the
README-DOCKERHUB.mdfile exists - Check that the workflow has the correct file path
- Verify the
- Go to Actions tab in GitHub
- Click on the failed workflow run
- Click on the job name (e.g., "build-and-push")
- Expand the failing step to see detailed logs
If you need to build and push manually:
# Build for multiple architectures
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 \
-t mrorbitman/karaoke-for-jellyfin:latest \
--push .
# Build for single architecture
docker build -t mrorbitman/karaoke-for-jellyfin:latest .
docker push mrorbitman/karaoke-for-jellyfin:latestOnce the workflow is set up and working:
- Create releases: Use semantic versioning (e.g., v1.0.0, v1.1.0)
- Monitor usage: Check Docker Hub for download statistics
- Update documentation: Keep README-DOCKERHUB.md up to date
- Security: Regularly rotate access tokens
If you encounter issues:
- Check the GitHub Actions logs
- Verify your Docker Hub credentials
- Test the Docker build locally first
- Check the GitHub Actions documentation