Daily Feishu Push #117
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
| name: Daily Feishu Push | |
| on: | |
| schedule: | |
| # 00:34 UTC = 08:34 Asia/Shanghai | |
| - cron: "34 0 * * *" | |
| # fallback: 00:49 UTC = 08:49 Asia/Shanghai | |
| - cron: "49 0 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| skip_doc: | |
| description: "Skip Feishu doc creation" | |
| required: false | |
| default: "false" | |
| permissions: | |
| contents: write | |
| jobs: | |
| push: | |
| runs-on: ubuntu-latest | |
| env: | |
| FEISHU_APP_ID: ${{ secrets.FEISHU_APP_ID }} | |
| FEISHU_APP_SECRET: ${{ secrets.FEISHU_APP_SECRET }} | |
| FEISHU_CHAT_ID: ${{ secrets.FEISHU_CHAT_ID }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Ensure runtime dir exists | |
| run: mkdir -p runtime | |
| - name: Restore push state | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: runtime/last_successful_push_date.txt | |
| key: daily-push-state-${{ github.ref_name }}-${{ github.run_id }} | |
| restore-keys: | | |
| daily-push-state-${{ github.ref_name }}- | |
| - name: Generate and push daily review | |
| run: | | |
| if [ "${{ github.event.inputs.skip_doc || 'false' }}" = "true" ]; then | |
| PYTHONPATH=. python3 interview_mvp/guard_daily_push.py --skip-doc | |
| else | |
| PYTHONPATH=. python3 interview_mvp/guard_daily_push.py | |
| fi | |
| - name: Save push state | |
| if: always() | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: runtime/last_successful_push_date.txt | |
| key: daily-push-state-${{ github.ref_name }}-${{ github.run_id }} | |
| - name: Upload generated artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: generated-files | |
| path: generated/ |