-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.18 KB
/
get_up.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: GET UP
on:
schedule:
# UTC 时间
- cron: "30 23 * * *"
workflow_dispatch:
inputs:
message:
description: "weather message"
required: false
jobs:
sync:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: install python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip" # caching pip dependencies
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: GET UP
run: |
python get_up.py ${{ secrets.G_T }} ${{ github.repository }} "${{ secrets.BING_COOKIE }}" --weather_message "${{ github.event.inputs.message }}" --lark_app_key "${{ secrets.LARK_APP_KEY }}" --lark_app_secret "${{ secrets.LARK_APP_SECRET }}" --lark_webhook_url "${{ secrets.LARK_WEBHOOK_URL }}"
- name: Push New Pic
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "generated today pic" || echo "no need to commit "
git push || echo "no file change"