This custom MegaLinter aims to have an optimized Docker image size.
It is built from official MegaLinter images, but is maintained on practicalli/megalinter-custom-flavor-clojure by Practicalli Engineering
- BASH_SHELLCHECK
- CLOJURE_CLJSTYLE
- CLOJURE_CLJ_KONDO
- DOCKERFILE_HADOLINT
- MARKDOWN_MARKDOWN_TABLE_FORMATTER
- MARKDOWN_RUMDL
- REPOSITORY_BETTERLEAKS
- SPELL_LYCHEE
- YAML_V8R
Follow MegaLinter installation guide, and replace related elements in the workflow.
- GitHub Action: On MegaLinter step in
.github/workflows/mega-linter.yml, defineuses: practicalli/megalinter-custom-flavor-clojure@main - Docker image: Replace official MegaLinter image with
ghcr.io/practicalli/megalinter-custom-flavor-clojure/megalinter-custom-flavor:latest
This custom flavor is automatically kept up to date with MegaLinter releases:
-
Automatic version sync: The
check-new-megalinter-versionworkflow runs daily, checks for new MegaLinter releases, and automatically creates matching releases in this repository. -
Automated builds: Each release triggers the
megalinter-custom-flavor-builderworkflow, which:- Builds a Docker image with only the selected linters
- Publishes to GitHub Container Registry (ghcr.io)
- Optionally publishes to Docker Hub (if credentials are configured)
-
Available image tags:
- Release tags (e.g.,
v9.0.0): Built from MegaLinter releases betatag: Built from non-main branch pushes for testinglatesttag: Points to the most recent release
- Release tags (e.g.,
Security warning: Using a Personal Access Token (PAT) is not recommended. Open-source projects have been heavily targeted by supply-chain attacks in recent months, and a leaked or compromised PAT can give attackers broad write access to your repository — better safe than sorry! If you do not need fully automatic daily version sync, you can skip the PAT entirely and trigger the
check-new-megalinter-versionworkflow manually whenever you want to upgrade.
If you decide automatic daily releases are worth the trade-off, configure a PAT_TOKEN secret as a repository-scoped fine-grained token with:
- Repository access: Only select repositories (select this repository)
- Repository permissions:
- Contents: Read and write
- Actions: Read and write
Rotate the token regularly.
See the Custom Flavors documentation for detailed setup instructions.
To publish to Docker Hub in addition to ghcr.io, configure:
DOCKERHUB_REPOvariable (e.g., your Docker Hub username)DOCKERHUB_USERNAMEsecretDOCKERHUB_PASSWORDsecret
If you need to manually trigger a build:
- Create a GitHub release: Creates a versioned build matching the tag name (e.g.,
v9.0.0) - Push to any branch (except main): Builds a
betatagged image for testing - Manually run the workflow: Go to Actions > Build & Push MegaLinter Custom Flavor > Run workflow
See full Custom Flavors documentation.
A MegaLinter custom flavor is still MegaLinter: this repository and the Docker image it publishes are covered by the AGPL-3.0 license.
The published image is built from the official MegaLinter image and bundles MegaLinter, whose source is available at oxsecurity/megalinter.
