オープンソースCI/CDツール比較:Gitea Actions vs Woodpecker CI vs Drone でCI/CDをセルフホストする
オープンソースラボ編集部 ・ 2026年6月13日
オープンソースCI/CDツール比較:Gitea Actions vs Woodpecker CI vs Drone でCI/CDをセルフホストする
GitHub ActionsやCircleCIに依存せず、CI/CDパイプラインをオープンソースでセルフホストしましょう。Gitea Actions・Woodpecker CI・Droneはコード変更のたびにテスト・ビルド・デプロイを自動実行し、データを自社インフラに完全保持できます。
CI/CDのセルフホストが必要な場面
- プライバシー: ソースコード・環境変数・ビルド成果物を外部SaaSに渡さない
- コスト削減: GitHub Actions Businessは$21/ユーザー/月〜、CircleCIは$15/ユーザー/月〜
- パフォーマンス: 自社の高スペックビルドマシンを使って高速ビルド
- エアギャップ: インターネット非接続環境でのCI/CD
- カスタムランナー: 専用ハードウェア(GPUビルド・ARM等)でビルド実行
主要ツールの概要
Gitea Actions
GiteaのGitホスティングプラットフォームに内蔵されているCI/CDシステムです。GitHub Actionsとほぼ互換のYAML構文を使用でき、既存のGitHub Actionsワークフローを最小限の変更でそのまま動かせます。act_runnerというランナーで実行され、セルフホストのGitHub Actionsとして機能します。
# GiteaをDockerで起動(Actions有効化)
version: "3"
services:
server:
image: gitea/gitea:latest
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__actions__ENABLED=true
ports:
- "3000:3000"
- "2222:22"
volumes:
- gitea_data:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
runner:
image: gitea/act_runner:latest
environment:
GITEA_INSTANCE_URL: http://server:3000
GITEA_RUNNER_REGISTRATION_TOKEN: your-registration-token
GITEA_RUNNER_NAME: my-runner
volumes:
- runner_data:/data
- /var/run/docker.sock:/var/run/docker.sock
volumes:
gitea_data:
runner_data:
# .gitea/workflows/ci.yml(GitHub Actionsと同じ構文)
name: CI Pipeline
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test -- --coverage
- name: Upload coverage
uses: codecov/codecov-action@v4
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t myapp:${{ github.sha }} .
docker tag myapp:${{ github.sha }} registry.example.com/myapp:latest
- name: Push to registry
run: |
echo ${{ secrets.REGISTRY_PASSWORD }} | docker login registry.example.com -u ${{ secrets.REGISTRY_USER }} --password-stdin
docker push registry.example.com/myapp:latest
deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Deploy to production
run: |
ssh -o StrictHostKeyChecking=no deploy@production.example.com "cd /app && docker compose pull && docker compose up -d"
Woodpecker CI
Droneのオープンソースフォークで、コミュニティ主導で開発されているCI/CDツールです。YAML定義のパイプライン・マルチステップ・マトリックスビルド・プラグインエコシステムを持ちます。GiteaやGitLabとの連携が容易です。
# Woodpecker CIをdocker-composeで起動(Gitea連携)
version: "3"
services:
woodpecker-server:
image: woodpeckerci/woodpecker-server:latest
ports:
- "8000:8000"
environment:
WOODPECKER_OPEN: "true"
WOODPECKER_GITEA: "true"
WOODPECKER_GITEA_URL: https://gitea.example.com
WOODPECKER_GITEA_CLIENT: your-oauth-client-id
WOODPECKER_GITEA_SECRET: your-oauth-client-secret
WOODPECKER_AGENT_SECRET: your-shared-agent-secret
WOODPECKER_HOST: https://ci.example.com
volumes:
- woodpecker_data:/var/lib/woodpecker
woodpecker-agent:
image: woodpeckerci/woodpecker-agent:latest
environment:
WOODPECKER_SERVER: woodpecker-server:9000
WOODPECKER_AGENT_SECRET: your-shared-agent-secret
WOODPECKER_MAX_PROCS: "4"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- woodpecker-server
# .woodpecker.yml
steps:
- name: lint
image: node:20-alpine
commands:
- npm ci
- npm run lint
- name: test
image: node:20-alpine
environment:
DATABASE_URL:
from_secret: test_database_url
commands:
- npm test
- name: build-docker
image: woodpeckerci/plugin-docker-buildx:latest
settings:
repo: registry.example.com/myapp
tags: latest
username:
from_secret: registry_user
password:
from_secret: registry_password
when:
branch: main
- name: deploy
image: appleboy/ssh-action:latest
settings:
host:
from_secret: deploy_host
username: deploy
key:
from_secret: deploy_ssh_key
script:
- cd /app
- docker compose pull
- docker compose up -d
when:
branch: main
event: push
# マトリックスビルド(複数Node.jsバージョンでテスト)
matrix:
NODE_VERSION:
- "18"
- "20"
- "22"
Drone
軽量でパフォーマンスが高いCI/CDプラットフォームです。Goで実装されており、Dockerコンテナでパイプラインステップを実行します。プラグイン(Docker Hub上の公開イメージ)でSlack通知・S3アップロード・Kubernetes デプロイ等を追加できます。
# Droneをdocker-composeで起動(Gitea連携)
version: "3"
services:
drone-server:
image: drone/drone:latest
ports:
- "8080:80"
environment:
DRONE_GITEA_SERVER: https://gitea.example.com
DRONE_GITEA_CLIENT_ID: gitea-oauth-client-id
DRONE_GITEA_CLIENT_SECRET: gitea-oauth-client-secret
DRONE_RPC_SECRET: your-rpc-secret
DRONE_SERVER_HOST: ci.example.com
DRONE_SERVER_PROTO: https
volumes:
- drone_data:/data
drone-runner:
image: drone/drone-runner-docker:latest
environment:
DRONE_RPC_PROTO: http
DRONE_RPC_HOST: drone-server
DRONE_RPC_SECRET: your-rpc-secret
DRONE_RUNNER_CAPACITY: 4
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- drone-server
# .drone.yml
kind: pipeline
type: docker
name: default
steps:
- name: test
image: node:20-alpine
environment:
NODE_ENV: test
commands:
- npm ci
- npm test
- name: build-and-push
image: plugins/docker
settings:
repo: registry.example.com/myapp
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
branch:
- main
- name: notify-slack
image: plugins/slack
settings:
webhook:
from_secret: slack_webhook
channel: "#deployments"
template: >
{{#success build.status}}
Build #{{build.number}} succeeded for {{repo.name}} ({{build.branch}})
{{else}}
Build #{{build.number}} FAILED for {{repo.name}} ({{build.branch}})
{{/success}}
when:
status:
- success
- failure
機能比較表
| 比較項目 | Gitea Actions | Woodpecker CI | Drone |
|---|---|---|---|
| GitHub Actions互換 | ★★★★★ | ❌ | ❌ |
| 設定の容易さ | ★★★★☆ | ★★★★☆ | ★★★★★ |
| マトリックスビルド | ✅ | ✅ | ✅ |
| プラグインエコシステム | ✅ GitHub Actions互換 | ✅ | ✅ Docker Hub |
| マルチアーキテクチャ | ✅(QEMU/buildx) | ✅ | ✅ |
| Kubernetes実行 | ✅ | ✅ | ✅ |
| シークレット管理 | ✅ | ✅ | ✅ |
| 並列ジョブ | ✅ | ✅ | ✅ |
| UIダッシュボード | ✅(Gitea内蔵) | ✅ | ✅ |
| 実装言語 | Go(act_runner) | Go | Go |
| ライセンス | MIT(act_runner) | Apache 2.0 | Apache 2.0(Enterprise別途) |
| GitHub Stars | 43k+(Gitea全体) | 4k+ | 32k+ |
CI/CD・DevOpsツールはDevOpsカテゴリ(/categories/devops)で一覧でき、コンテナ・KubernetesツールはDevOpsカテゴリ(/categories/devops)でも探せます。
FAQ
Q. GitHub ActionsからGitea Actionsに移行する際の変更点は?
A. Gitea ActionsはGitHub Actionsと高い互換性があり、多くのワークフローはそのままコピーして動作します。主な違い: 1) github.*コンテキストの代わりにgitea.*を使う必要がある場合がある(例: github.sha→gitea.sha)、2) GitHub-hosted runnerのラベル(ubuntu-latest・macos-latest・windows-latest)はact_runnerがサポートするOSに変換される、3) GitHub Marketplace の全てのActionが使えるわけではない(Dockerベースのアクションは動作するが、JavaScriptベースのアクションは環境次第)。Gitea公式のアクション互換性リストを確認してから移行することを推奨します。
Q. Woodpecker CIのプラグインはどこで見つけられますか?
A. Woodpecker CI専用のプラグインはplugins.woodpecker-ci.org↗で公開されています。Droneのプラグイン(Docker Hubでdrone/plugin-*として公開)もWoodpecker CIで動作します。プラグインは通常のDockerコンテナで、環境変数経由で設定を渡す設計のため、Dockerが動けばどこでも使えます。カスタムプラグインもsettingsの値を環境変数に変換するコンテナを作るだけで実装できます。
Q. DroneのDRONE_TOKENとDRONE_RPC_SECRETは何が違いますか?
A. DRONE_RPC_SECRETはDroneサーバーとエージェント(ランナー)の間の通信認証に使うシークレットです。外部には公開せず、サーバーとエージェント間で共有します。DRONE_TOKEN(またはAPI Token)は各ユーザーがDroneのREST APIやCLI(drone-cli)にアクセスするための個人トークンで、Drone UIの「Account Settings」から取得します。インフラ自動化でDrone APIを呼ぶ場合(リポジトリのアクティベート・シークレット設定など)は後者を使います。
Q. セルフホストCI/CDでGPUビルド(機械学習・CUDA)はできますか?
A. はい。GPUが搭載されたマシンにact_runner・Woodpecker Agent・Droneランナーをインストールし、Dockerの--gpus allオプションを有効化することでGPUを使ったビルド・テストができます。設定例(Droneランナー): DRONE_RUNNER_VOLUMES=/dev/nvidia0:/dev/nvidia0とDRONE_RUNNER_DEVICES=/dev/nvidiactl:/dev/nvidiactlを追加し、パイプラインのステップでnvidia/cuda:12.0-baseイメージを使います。GitHub Actionsのホストランナーにはこの機能がないため、ML系のCIではセルフホストの大きな優位点になります。
まとめ
| ユースケース | 推奨ツール |
|---|---|
| GitHub Actions移行・互換優先 | Gitea Actions |
| Gitea/GitLabとのシンプルな統合 | Woodpecker CI |
| 軽量・高速・プラグイン豊富 | Drone |
| GitHub Actions代替 | Gitea + Gitea Actions |