Files
wauto/README.md
T
Hira 4cb903f2f7
CI / CD / Lint & Build (CI) (push) Successful in 11m42s
CI / CD / Build & Push Docker Image (CD) (push) Failing after 3m49s
feat: setup Gitea Actions CI/CD and Docker configuration
2026-11-21 01:53:02 +07:00

2.2 KiB

wauto 🤖

A WhatsApp bot built with TypeScript, Baileys, and Sharp.

Features

  • !ping - Responds with pong
  • !time - Current time in WIB (Asia/Jakarta)
  • !echo <text> - Echoes your message
  • !sticker / !stiker / !s - Converts sent or quoted image/video/sticker into a WhatsApp sticker
  • !help - Displays command list

Local Development

  1. Install dependencies:

    npm install
    
  2. Run in development mode (with auto-reload):

    npm run dev
    
  3. Build and run production build:

    npm run build
    npm start
    

CI / CD with Gitea Actions

The repository includes automated CI/CD configured in .gitea/workflows/ci-cd.yaml:

  1. CI (Continuous Integration):

    • Triggers on every push and pull_request targeting main.
    • Runs npm ci and npm run build (TypeScript compilation & type checking).
  2. CD (Continuous Delivery):

    • Triggers on push to main and version tags (v*).
    • Builds a production-ready, multi-stage Docker container.
    • Pushes the image to the Gitea Container Registry:
      git.hrkm.my.id/hira/wauto:latest
      

Authentication for Gitea Actions Runner

The workflow uses ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN }}.

  • If your Gitea instance has Actions package permissions enabled, ${{ secrets.GITHUB_TOKEN }} works automatically.
  • Alternatively, you can add a repository secret named GITEA_TOKEN with a Personal Access Token (read:package, write:package).

Deployment with Docker Compose

Deploy the bot on your server using the included docker-compose.yml:

  1. Log in to Gitea Container Registry on your server:

    docker login git.hrkm.my.id
    
  2. Pull and start the container:

    docker compose pull
    docker compose up -d
    
  3. Scan the WhatsApp QR code to link your account:

    docker compose logs -f
    

Important

: The ./auth directory is mounted into /app/auth inside the container so your session login credentials persist across container restarts and updates.