DEV Community

Alex Spinov
Alex Spinov

Posted on

Woodpecker CI Has a Free API — Lightweight CI/CD for Gitea and GitHub

Woodpecker CI is a community fork of Drone CI. It is simple, container-based, and perfect for self-hosted Git platforms like Gitea and Forgejo.

What Is Woodpecker CI?

Woodpecker runs your CI/CD pipelines in Docker containers. YAML config, multi-platform, and easy to self-host.

Features:

  • Docker-based pipelines
  • YAML configuration
  • GitHub, Gitea, Forgejo, GitLab support
  • Multi-platform (Linux, ARM)
  • Secrets management
  • Free and open source

Quick Start

docker run -p 8000:8000 woodpeckerci/woodpecker-server
Enter fullscreen mode Exit fullscreen mode

Pipeline Example

pipeline:
  test:
    image: node:20
    commands:
      - npm install
      - npm test

  build:
    image: node:20
    commands:
      - npm run build
    when:
      branch: main

  deploy:
    image: plugins/docker
    settings:
      repo: registry.example.com/myapp
      tags: latest
    when:
      branch: main
Enter fullscreen mode Exit fullscreen mode

REST API

# List repos
curl http://localhost:8000/api/repos \
  -H "Authorization: Bearer YOUR_TOKEN"

# Get pipeline
curl http://localhost:8000/api/repos/OWNER/REPO/pipelines/1 \
  -H "Authorization: Bearer YOUR_TOKEN"

# Trigger build
curl -X POST http://localhost:8000/api/repos/OWNER/REPO/pipelines \
  -H "Authorization: Bearer YOUR_TOKEN"
Enter fullscreen mode Exit fullscreen mode

Use Cases

  1. Self-hosted CI — pair with Gitea/Forgejo
  2. Docker builds — container-native pipelines
  3. ARM builds — Raspberry Pi CI
  4. Testing — run tests on every push
  5. GitOps — deploy on merge

Need web data at scale? Check out my scraping tools on Apify or email spinov001@gmail.com for custom solutions.

Top comments (0)