Skip to content

arxiv_feishu_msg

arxiv_feishu_msg #12

# 这个工作流负责在arxiv处理和网页生成完成后发送飞书消息
name: arxiv_feishu_msg
on:
# 在完整的arxiv处理工作流完成后触发
workflow_run:
workflows: ["arxiv_daily_full"]
types:
- completed
# 手动触发
workflow_dispatch:
env:
PYTHON_VERSION: "3.8"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
send_feishu_notification:
runs-on: ubuntu-latest
# 当自动触发时检查前一个工作流成功,手动触发时无条件运行
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
permissions:
issues: write
contents: read
steps:
# 检出代码
- name: Checkout repository
uses: actions/checkout@v3
# 设置Python环境
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
# 安装依赖
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# 发送飞书消息
- name: Send Feishu message
env:
# 可配置的环境变量
FEISHU_URL: ${{ secrets.FEISHU_URL }}
# 确保脚本可以找到所需模块
PYTHONPATH: ${{ github.workspace }}
run: |
cd paperBotV2/arxiv_daily
python arxiv_feishu_msg.py