This implementation adds automated GitHub Actions workflows to monitor Caddy updates, automatically build Docker images, and publish releases. The system provides continuous integration and deployment for the docker-webdav project.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Automated Update System β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββ ββββββββββββββββββββ
β Daily Cron βββββββββ>β Check Updates β
β (00:00 UTC) β β Workflow β
βββββββββββββββββββ ββββββββββ¬ββββββββββ
β
v
ββββββββββββββββββββββ
β Compare Versions β
ββββββββββ¬ββββββββββββ
β
ββββββββββββββββββ΄βββββββββββββββββ
v v
βββββββββββββββββ βββββββββββββββββββ
β No Update β β New Version β
β (Skip) β β Available β
βββββββββββββββββ ββββββββββ¬βββββββββ
β
v
βββββββββββββββββββββββββ
β Update Dockerfile & β
β version.txt β
βββββββββββββ¬ββββββββββββ
β
v
βββββββββββββββββββββββββ
β Create Pull Request β
βββββββββββββ¬ββββββββββββ
β
ββββββββββββvββββββββββββ
β Manual Review & Merge β
βββββββββββββ¬ββββββββββββ
β
v
βββββββββββββββββββ βββββββββββββββββββββββββββββββββββββ
β Push to main βββββββββ>β Build & Publish Workflow β
β (version.txt) β βββββββββββββ¬ββββββββββββββββββββββββ
βββββββββββββββββββ β
v
βββββββββββββββββββββββββββββ
β Build Docker Image β
β - linux/amd64 β
β - linux/arm64 β
βββββββββββββ¬ββββββββββββββββ
β
βββββββββββββββββ΄ββββββββββββββββ
v v
βββββββββββββββββββββ ββββββββββββββββββββββ
β Push to DockerHub β β Create GitHub β
β - version tag β β Release β
β - latest tag β β - version tag β
βββββββββββββββββββββ β - release notes β
ββββββββββββββββββββββ
βββββββββββββββββββ ββββββββββββββββββββ
β Weekly Cron βββββββββ>β Check Plugin β
β (Monday) β β Updates β
βββββββββββββββββββ ββββββββββ¬ββββββββββ
β
v
ββββββββββββββββββββββ
β Create/Update β
β Status Issue β
ββββββββββββββββββββββ
Purpose: Automatically detect new Caddy releases and create PRs
Key Features:
- Runs daily at 00:00 UTC
- Compares current version with latest Caddy release
- Automatically updates
version.txtandDockerfile - Creates a pull request for review
- Includes release notes link
Trigger Options:
- Scheduled: Daily via cron
- Manual: via workflow_dispatch
Purpose: Build and publish Docker images with automatic releases
Key Features:
- Multi-platform builds (amd64, arm64)
- Push to Docker Hub with version and latest tags
- Automatic GitHub release creation
- Improved caching strategy
- Support for manual triggers and PRs
Trigger Options:
- Push to main (when version.txt, Dockerfile, or Caddyfile-* change)
- Pull requests to main
- Manual: via workflow_dispatch
Purpose: Monitor plugin updates and report status
Key Features:
- Runs weekly on Monday
- Checks caddy-webdav latest commit
- Checks caddy-dns/cloudflare latest version
- Creates informational GitHub issues
- Prevents duplicate issues
Trigger Options:
- Scheduled: Weekly via cron
- Manual: via workflow_dispatch
- Before: Manual version updates required
- After: Automatic detection and PR creation for Caddy updates
- Before: Single platform (amd64)
- After: Multi-platform (amd64, arm64)
- Before: Manual releases
- After: Automatic GitHub releases with detailed notes
- Before: No plugin update tracking
- After: Weekly plugin status reports
- Before: Basic caching
- After: Improved caching with mode=max
- Before: Manual trigger only
- After: Automated workflow with manual override option
The following secrets must be configured in GitHub repository settings:
DOCKER_HUB_USERNAME- Docker Hub usernameDOCKER_HUB_ACCESS_TOKEN- Docker Hub personal access tokenGITHUB_TOKEN- Automatically provided by GitHub Actions
Each workflow uses minimal required permissions:
contents: write- For creating releases and committing changespull-requests: write- For creating pull requestspackages: write- For Docker image publishing
- Plugins are automatically pulled at their latest versions during build
- This ensures security patches are included
- Plugin check workflow provides visibility into updates
The workflows run automatically:
- Daily Caddy version checks
- Weekly plugin status reports
- Automatic builds on version changes
Trigger workflows manually via GitHub UI:
- Go to Actions tab
- Select the workflow
- Click "Run workflow"
- Choose branch and confirm
When a new Caddy version is detected:
- A PR is automatically created
- Review the changes and release notes
- Merge the PR to trigger build and release
- Docker image and GitHub release are created automatically
- Test check-updates workflow manually
- Verify PR creation works
- Test docker-publish workflow with a test push
- Verify Docker Hub credentials are correct
- Check GitHub release creation
- Review workflow run history regularly
- Check for failed runs in Actions tab
- Monitor Docker Hub for successful pushes
- Verify releases are created correctly
Edit the workflow files to change schedules:
on:
schedule:
- cron: '0 0 * * *' # Daily at midnight UTCChange repository or tag names in docker-publish.yml:
tags: |
${{ secrets.DOCKER_HUB_USERNAME }}/webdav:${{ env.VERSION }}
${{ secrets.DOCKER_HUB_USERNAME }}/webdav:latestTo add plugins to the build:
- Update Dockerfile to include the plugin
- Update check-plugin-updates.yml to monitor it
- Update documentation
- Time Savings: Eliminates manual version checking and updates
- Reliability: Consistent, automated build and release process
- Transparency: All changes tracked in pull requests
- Multi-Architecture: Supports more deployment scenarios
- Current Security: Always builds with latest plugin versions
- Documentation: Automatic release notes and version tracking
Potential improvements for the future:
- Add automated testing before release
- Implement rollback capabilities
- Add notification systems (Slack, email)
- Create changelog automation
- Add security scanning (Trivy, Snyk)
- Implement staging environment tests
- Add performance benchmarking
- Check cron syntax in workflow file
- Verify workflow is enabled in Actions settings
- Check repository permissions
- Review build logs in Actions tab
- Verify Docker Hub credentials
- Check Dockerfile syntax
- Ensure version.txt is valid
- Check GITHUB_TOKEN permissions
- Verify branch protection rules
- Review workflow logs for errors
This implementation is part of the docker-webdav project and follows the same MIT License.