This repository provides an automated GitHub Actions workflow to build and publish a custom Docker image of Mastodon with the Bird UI theme pre-installed and configured as the default theme.
- Automated Upstream Checking: A scheduled cron job runs every 6 hours to check for new stable releases of Mastodon.
- Native Multi-Arch Support: Builds both
linux/amd64andlinux/arm64images using native GitHub runner architectures (no QEMU emulation) for maximum build speed. - Efficient Caching: Uses Docker Buildx with GitHub Actions caching to reuse layers across builds.
- Clean Theme Separation: Properly resolves duplicate "Mastodon" theme options in the UI, separating them into "Mastodon" (default dark) and "Mastodon Bird UI".
- Default Integration: Sets the Bird UI theme as the default theme automatically.
The built multi-arch Docker image is published to the GitHub Container Registry (GHCR).
You can use it in your docker-compose.yml by replacing the official Mastodon image with this custom one:
services:
web:
image: ghcr.io/bedrockdigger/mastodon-with-bird-ui:latest
# ... rest of your configurationlatest: Always points to the image built from the latest stable Mastodon release.<version>(e.g.,v4.3.0): Points to the image built for a specific Mastodon release version.
The workflow Build Mastodon with Bird UI performs the following steps:
- Upstream Release Detection: Queries the GitHub API for the latest release of
mastodon/mastodon. - Pre-build Check: Checks if the target version tag has already been built and exists in GHCR (skips if it does).
- Integration:
- Clones
mastodon/mastodonat the target version. - Clones
rollecode/mastodon-bird-ui. - Runs the Bird UI installation script with the
-d(default) flag. - Creates a dedicated YAML locale file (
config/locales/zzz-bird-ui.yml) to correctly rename the default Bird UI theme to"Mastodon Bird UI"and keep the original dark theme as"Mastodon".
- Clones
- Multi-Arch Compilation:
- Compiles the amd64 image on
ubuntu-24.04. - Compiles the arm64 image on
ubuntu-24.04-arm. - Uploads build digests as artifacts.
- Compiles the amd64 image on
- Manifest Creation: Merges the platform-specific digests into a single multi-arch manifest tag and pushes it to
ghcr.io/bedrockdigger/mastodon-with-bird-ui.
You can manually run the workflow via the Actions tab on GitHub:
- Force rebuild: Force-rebuilds and overwrites the existing tag in GHCR even if it already exists.
- Custom Tag: Specify a specific Mastodon version tag (e.g.,
v4.2.9) to build that specific version rather than the latest stable one.
This repository is licensed under the MIT License. Mastodon and Bird UI are owned and licensed by their respective creators.