Update Feishu Daily #6
This file contains 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
name: Update Feishu Daily | |
on: | |
workflow_run: | |
workflows: ["Generate Daily Markdown"] | |
types: [completed] | |
workflow_dispatch: # 手动触发 | |
jobs: | |
publish_to_feishu_bitable: | |
runs-on: ubuntu-latest | |
env: | |
PUBLISH_ENABLED: 'true' # 设置环境变量,控制是否启用发布 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
if: ${{ env.PUBLISH_ENABLED == 'true' }} | |
run: | | |
pip install python-dotenv | |
pip install pytz | |
pip install requests | |
- name: Publish to Feishu Document | |
if: ${{ env.PUBLISH_ENABLED == 'true' }} | |
env: | |
FEISHU_APP_ID: ${{ secrets.FEISHU_APP_ID }} | |
FEISHU_APP_SECRET: ${{ secrets.FEISHU_APP_SECRET }} | |
run: | | |
python scripts/update_feishu_daily.py |