Skip to content

feat: add digest workflow in github action - #18

Open
Issacwww wants to merge 1 commit into
zarazhangrui:mainfrom
Issacwww:addDigestWorkflow
Open

feat: add digest workflow in github action#18
Issacwww wants to merge 1 commit into
zarazhangrui:mainfrom
Issacwww:addDigestWorkflow

Conversation

@Issacwww

Copy link
Copy Markdown

Add GitHub Actions digest workflow

Adds a third deployment option: run the full digest pipeline (prepare → LLM remix → deliver) in GitHub Actions, so users don't need a local agent or computer running.

What's new

  • scripts/remix-digest.js — New script that calls LLM API (Anthropic Claude or OpenAI) using native fetch to remix feed data into a readable digest. Supports --language, --model flags. No new npm dependencies.
  • .github/workflows/digest.yml — New workflow: daily cron (UTC 7:00) + manual trigger. Gated by DIGEST_FEATURE_FLAG variable (default unset, so it never runs in upstream).
  • README updates (EN + ZH) — GitHub Actions setup instructions and Secrets/Variables reference table.

How it works

  1. prepare-digest.js fetches the central feed JSON (no change to existing script)
  2. remix-digest.js reads the JSON, calls LLM API with the project's prompts to generate summaries
  3. deliver.js sends the digest via Telegram or Email (no change to existing script)

For fork users

  1. Fork → set DIGEST_FEATURE_FLAG to true in repo Variables
  2. Add LLM secret: OPENAI_API_KEY or ANTHROPIC_API_KEY
  3. Add delivery secrets: TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID for Telegram, or RESEND_API_KEY + DIGEST_EMAIL for Email
  4. Optionally set Variables: DIGEST_LANGUAGE (en/zh/bilingual), DELIVERY_METHOD (telegram/email/stdout), LLM_MODEL
  5. Enable workflows → done

Design decisions

  • Native fetch only, no SDK dependencies added
  • max_completion_tokens for OpenAI (compatible with GPT-5.4+), max_tokens for Anthropic
  • Feature flag ensures zero impact on upstream repo
  • Artifact fallback if delivery fails

Tested

  • End-to-end: triggered via workflow_dispatch on fork, received digest in Telegram (Chinese, GPT-5.4). CI Run

irenelrc pushed a commit to irenelrc/follow-builders that referenced this pull request Apr 9, 2026
Add GitHub Actions workflow (digest.yml) and remix script (remix-digest.js)
from PR zarazhangrui#18. Runs daily at 8am Eastern, remixes feed via Claude/OpenAI API,
delivers to Telegram.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant