ci: replace Woodpecker with Forgejo Actions (act_runner)
Some checks failed
Docker Build & Push / build (push) Failing after 1m57s
Some checks failed
Docker Build & Push / build (push) Failing after 1m57s
- Remove .woodpecker.yml - Add .forgejo/workflows/docker-build.yml - Update copilot-instructions.md: Woodpecker -> Forgejo Actions
This commit is contained in:
parent
5c75083901
commit
6470bd5875
3 changed files with 43 additions and 30 deletions
40
.forgejo/workflows/docker-build.yml
Normal file
40
.forgejo/workflows/docker-build.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
name: Docker Build & Push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Forgejo Container Registry
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: 192.168.178.6:8083
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build only (pull request)
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
run: |
|
||||||
|
docker buildx build \
|
||||||
|
--platform linux/amd64 .
|
||||||
|
|
||||||
|
- name: Build and push (main)
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
run: |
|
||||||
|
docker buildx build --push \
|
||||||
|
--tag 192.168.178.6:8083/cschulz/rd13_media_wiki:latest \
|
||||||
|
--platform linux/amd64 \
|
||||||
|
--output type=registry,registry.insecure=true .
|
||||||
6
.github/copilot-instructions.md
vendored
6
.github/copilot-instructions.md
vendored
|
|
@ -7,7 +7,7 @@ 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, Forgejo (self-hosted Git), Woodpecker CI, Forgejo Container Registry, Linux Server (remote via VS Code Server)
|
- Infrastructure: Docker Compose, Forgejo (self-hosted Git), Forgejo Actions (act_runner), 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)
|
||||||
|
|
@ -21,7 +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
|
- CI/CD: Forgejo Actions pipeline defined in `.forgejo/workflows/docker-build.yml`
|
||||||
- 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
|
||||||
|
|
@ -52,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: Woodpecker CI pipeline runs `docker buildx build` (dry-run) on PRs, build+push on merge to `main`
|
- Build test: Forgejo Actions 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`
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
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
|
|
||||||
insecure: true
|
|
||||||
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
|
|
||||||
Loading…
Add table
Reference in a new issue