-
Notifications
You must be signed in to change notification settings - Fork 221
feat: daily community content push bot (Feishu CN + Discord EN) #1141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
194841c
feat: add daily community content push bot
0cb2d2a
fix: resolve biome lint errors in daily-content-bot
dce04ac
chore: remove accidentally committed package-lock.json
d762ba2
fix: resolve pre-existing biome lint errors in test files
8c8e5ef
chore: remove package-lock.json and add to gitignore
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: Community Content Push | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 1 * * 1-5" # 技术资讯 — 工作日北京 9:00 | ||
| - cron: "0 4 * * 1-5" # 技术生态 — 工作日北京 12:00 | ||
| - cron: "0 12 * * 1-5" # AI 产品榜单 — 工作日北京 20:00 | ||
| - cron: "0 10 * * 5" # 周报 — 周五北京 18:00 | ||
| - cron: "0 2 * * 0,6" # Weekend Pick — 周末北京 10:00 | ||
| workflow_dispatch: | ||
| inputs: | ||
| theme: | ||
| description: "Content theme to push" | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - tech-news | ||
| - tech-eco | ||
| - ai-products | ||
| - weekly | ||
| - weekend | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| push: | ||
| name: Generate and Push Content | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| sparse-checkout: scripts/notify | ||
|
|
||
| - name: Resolve content theme | ||
| id: theme | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | ||
| echo "theme=${{ inputs.theme }}" >> "$GITHUB_OUTPUT" | ||
| else | ||
| case "${{ github.event.schedule }}" in | ||
| "0 1 * * 1-5") echo "theme=tech-news" >> "$GITHUB_OUTPUT" ;; | ||
| "0 4 * * 1-5") echo "theme=tech-eco" >> "$GITHUB_OUTPUT" ;; | ||
| "0 12 * * 1-5") echo "theme=ai-products" >> "$GITHUB_OUTPUT" ;; | ||
| "0 10 * * 5") echo "theme=weekly" >> "$GITHUB_OUTPUT" ;; | ||
| "0 2 * * 0,6") echo "theme=weekend" >> "$GITHUB_OUTPUT" ;; | ||
| esac | ||
| fi | ||
|
|
||
| - name: Generate and send content | ||
| env: | ||
| CONTENT_THEME: ${{ steps.theme.outputs.theme }} | ||
| FEISHU_WEBHOOK_URL: ${{ secrets.COMMUNITY_CONTENT_FEISHU_WEBHOOK }} | ||
| DISCORD_WEBHOOK_URL: ${{ secrets.COMMUNITY_CONTENT_DISCORD_WEBHOOK }} | ||
| LLM_API_BASE: ${{ secrets.LITELLM_ENDPOINT }} | ||
| LLM_API_KEY: ${{ secrets.LITELLM_API_KEY }} | ||
| LLM_MODEL: anthropic/claude-sonnet-4 | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: node scripts/notify/daily-content-bot.mjs | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,3 +40,4 @@ apps/desktop/build-config.json | |
| .task/ | ||
| .opencode/ | ||
| docs/superpowers/ | ||
| package-lock.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.