Reusable Workflows
The middag-io organization maintains reusable workflows in a central repository. Consuming repositories call these workflows with uses:, inheriting CI, release, documentation, deploy, and operations logic without duplication.
Moodle is MIDDAG's primary project family. WordPress remains supported, but it was mainly the first operational validation.
Overview
| Workflow | Family | Purpose | Version |
|---|---|---|---|
| Moodle Plugin CI | Moodle | PHP/Composer validation for Moodle plugins | @workflows-v1 |
| Moodle Plugin Dist | Moodle | Build distributable Moodle plugin ZIP | @workflows-v1 |
| Moodle Plugin Release | Moodle | Moodle release with ZIP and Private Satis | @workflows-v1 |
| WordPress Plugin CI | WordPress | Linting, static analysis, and tests for WP plugins | @workflows-v1 |
| WordPress Theme CI | WordPress | Linting and static analysis for WP themes | @workflows-v1 |
| WP Plugin Post-Release | WordPress | Build dist ZIP and upload to GitHub Release | @workflows-v1 |
| Composer Package CI | PHP/Composer | CI for PHP/Composer libraries | @workflows-v1 |
| Cloudflare App CI | Apps | CI for Next/Vite/OpenNext apps | @workflows-v1 |
| Cloudflare App Deploy | Apps | App deploy via Wrangler | @workflows-v1 |
| Docs Deploy | Docs | Build and deploy VitePress sites to Cloudflare Pages | @workflows-v1 |
| MkDocs Build | Docs | Strict MkDocs build | @workflows-v1 |
| MkDocs Deploy | Docs | MkDocs deploy to Cloudflare Pages | @workflows-v1 |
| Release Please | Release | Automated versioning via conventional commits | @workflows-v1 |
| Sync Develop | Release | Merge main into develop after release | @workflows-v1 |
| Docker WP Operations | Operations | Backup, cache flush, and WP-CLI on EC2 servers | @workflows-v1 |
How it works
All workflows are reusable workflows (on: workflow_call). The consuming repository creates a local workflow that references the centralized one:
yaml
# .github/workflows/ci.yml (in the plugin repository)
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
ci:
uses: middag-io/.github-private/.github/workflows/moodle-plugin-ci.yml@workflows-v1
with:
run-check-style: true
run-check-stan: trueBenefits
- Standardization — all repositories follow the same CI pipeline.
- Centralized maintenance — fixes and improvements propagate automatically.
- Flexibility — boolean and string inputs allow enabling/disabling steps per repository.
- Secrets control — workflows should declare minimum required secrets when possible.
- Versioning — stable consumers should use workflow tags/channels, not
@main.
Architecture decisions
For more context on why reusable workflows were adopted, see ADR-006: Reusable Workflows.