Automated build system for Caddy web server with custom plugins using GitHub Actions.
Edit the plugins.txt file to add your desired Caddy plugins. Add one plugin per line:
github.com/caddy-dns/cloudflare
github.com/mholt/caddy-l4
github.com/greenpau/caddy-securityLines starting with # are treated as comments and ignored.
Builds are triggered automatically in the following scenarios:
- Push to main/master branch: When
plugins.txtor workflow files are modified - Weekly schedule: Every Monday at 00:00 UTC
- Manual trigger: Via GitHub Actions "Run workflow" button
- Automatic updates: When new Caddy version is detected (checked daily)
After a successful build:
- Go to the Actions tab in GitHub
- Click on the latest successful workflow run
- Download the artifacts for your platform
- Or check the Releases page for versioned releases
- Linux amd64 (x86_64)
- Linux arm64 (aarch64)
- Linux armv7 (32-bit ARM)
- Linux armv6 (Raspberry Pi, etc.)
- Linux 386 (32-bit x86)
Builds Caddy with specified plugins for all Linux platforms.
- Reads plugins from
plugins.txt - Builds binaries using xcaddy
- Tests binary integrity
- Uploads artifacts
- Creates releases on push to main/master
Automatically checks for Caddy and plugin updates.
- Runs daily at 06:00 UTC
- Checks GitHub for latest Caddy release
- Monitors plugin repositories for updates
- Triggers builds when updates are detected
- Maintains version tracking
To add a plugin, edit plugins.txt and add the plugin's import path:
# DNS providers
github.com/caddy-dns/cloudflare
# Layer 4 support
github.com/mholt/caddy-l4
# Security features
github.com/greenpau/caddy-securityEach build includes automated tests:
- Binary verification: Confirms binary format and architecture
- Execution test: Runs
caddy versionandcaddy list-modules - Module validation: Ensures custom plugins are loaded
You can validate your configuration locally before pushing:
# Test plugin configuration parsing
./test-config.sh
# Run full integration tests
./test-integration.shThese scripts verify:
- Workflow file syntax
- Plugin configuration format
- Required build matrix components
- Documentation completeness
Edit the cron schedule in .github/workflows/check-updates.yml:
schedule:
- cron: '0 6 * * *' # Daily at 06:00 UTCTo add Windows or macOS support, edit the matrix in .github/workflows/build-caddy.yml:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]You may need to add platform specific tests.
- Check the Actions log for specific error messages
- Verify plugin paths in
plugins.txtare correct - Ensure plugins are compatible with the latest Caddy version
- Verify the plugin path in
plugins.txt - Check if the plugin is compatible with current Caddy version
- Review the build logs for compilation errors
Feel free to open issues or submit pull requests for improvements.
See LICENSE file for details.
- Caddy - The web server
- xcaddy - Build tool
- Caddy Plugins - Plugin directory