ci: migrate from GitHub Actions to Woodpecker CI on Forgejo

- Add .woodpecker.yml with build+push on main, dry-run on pull_request
- Image target: 192.168.178.6:8083/cschulz/rd13_media_wiki:latest
- Update copilot-instructions.md: GHCR → Forgejo Registry, GH Actions → Woodpecker
- Update README.md: replace GitHub Actions reference with Woodpecker CI
This commit is contained in:
Conrad Schulz 2026-05-30 11:04:42 +00:00
parent 2a72e08c13
commit e8bdd13531
3 changed files with 31 additions and 4 deletions

View file

@ -7,12 +7,12 @@ MediaWiki deployment for rd13 a self-hosted wiki running in Docker, served v
- Language: PHP (MediaWiki core + extensions), YAML, Dockerfile - Language: PHP (MediaWiki core + extensions), YAML, Dockerfile
- Framework: MediaWiki - Framework: MediaWiki
- Database: MariaDB - Database: MariaDB
- Infrastructure: Docker Compose, GitHub Container Registry (ghcr.io), Linux Server (remote via VS Code Server) - Infrastructure: Docker Compose, Forgejo (self-hosted Git), Woodpecker CI, Forgejo Container Registry, Linux Server (remote via VS Code Server)
## Architecture ## Architecture
- Pattern: Containerised deployment (App + DB as separate services) - Pattern: Containerised deployment (App + DB as separate services)
- Key constraints: No application code changes configuration and infrastructure only - Key constraints: No application code changes configuration and infrastructure only
- Image published to: `ghcr.io/c-schulz-rd13/rd13_media_wiki:latest` - Image published to: `192.168.178.6:8083/cschulz/rd13_media_wiki:latest` (Forgejo Container Registry)
- Extensions live in: `wikidata/extensions/` - Extensions live in: `wikidata/extensions/`
- Wiki config: `wikidata/LocalSettings.php` - Wiki config: `wikidata/LocalSettings.php`
- Upload config: `wikidata/uploads.ini` - Upload config: `wikidata/uploads.ini`
@ -21,6 +21,7 @@ MediaWiki deployment for rd13 a self-hosted wiki running in Docker, served v
- Branch naming: `feat/<ticket>-description`, `fix/<ticket>-description` - Branch naming: `feat/<ticket>-description`, `fix/<ticket>-description`
- Commit format: Conventional Commits (`feat|fix|chore|docs|refactor|ci`) - Commit format: Conventional Commits (`feat|fix|chore|docs|refactor|ci`)
- Secrets: never in `docker-compose.yml` or `LocalSettings.php` use `.env` files or Docker secrets - Secrets: never in `docker-compose.yml` or `LocalSettings.php` use `.env` files or Docker secrets
- CI/CD: Woodpecker CI pipeline defined in `.woodpecker.yml` at repo root
- Images: always pin with a specific tag, avoid `:latest` in production compose files - Images: always pin with a specific tag, avoid `:latest` in production compose files
## Engineering Process ## Engineering Process
@ -51,7 +52,7 @@ A task is only done when ALL of the following are true:
## Testing Strategy ## Testing Strategy
- No unit/integration tests (deployment-only repo) - No unit/integration tests (deployment-only repo)
- Validation: `docker compose config` for compose syntax - Validation: `docker compose config` for compose syntax
- Build test: CI pipeline runs `docker buildx build` on PRs - Build test: Woodpecker CI pipeline runs `docker buildx build` (dry-run) on PRs, build+push on merge to `main`
## Security ## Security
- No secrets in code or config files use environment variables / `.env` - No secrets in code or config files use environment variables / `.env`

26
.woodpecker.yml Normal file
View file

@ -0,0 +1,26 @@
steps:
# Build and push image on push to main
- name: docker-build-push
image: woodpeckerci/plugin-docker-buildx
settings:
registry: 192.168.178.6:8083
repo: 192.168.178.6:8083/cschulz/rd13_media_wiki
tags: latest
platforms: linux/amd64
username: cschulz
password:
from_secret: RD13_MW_DOCKER_BUILD_TOKEN
when:
- event: push
branch: main
# Build only (no push) on pull requests
- name: docker-build-only
image: woodpeckerci/plugin-docker-buildx
settings:
repo: 192.168.178.6:8083/cschulz/rd13_media_wiki
platforms: linux/amd64
dry_run: true
when:
- event: pull_request
branch: main

View file

@ -20,7 +20,7 @@ docker run --rm -it -v ./maps_data:/data -p 8091:80 klokantech/openmaptiles-serv
## Update of the MediaWiki Core ## Update of the MediaWiki Core
Um eine neues Dockerimages mit der neusten Version zu bauen kann mann entweder einen neuen Commit im Master machen, falls Code änderungen nötig sind, oder händisch im Github über Actions den Build Workflow auslösen. Um ein neues Docker-Image mit der neusten Version zu bauen, kann man entweder einen neuen Commit auf `main` pushen (Woodpecker CI baut und pushed das Image automatisch), oder den Build-Workflow händisch in Woodpecker über die UI auslösen.
Nach dem das neue Images gebaut ist, kann es mit gepulled und gestartet werden. Nach dem das neue Images gebaut ist, kann es mit gepulled und gestartet werden.
Hierfür kann man folgende Kommandos nehmen. Hierfür kann man folgende Kommandos nehmen.