Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
code-gyu committed May 26, 2024
1 parent 2c5fc05 commit 7992592
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@
name: morning
name: wx天气预报推送

on:
schedule:
- cron: '* * * * *'
# 启动时间,为 UTC 时间对应北京时间早7点
- cron : '00 23 * * *'
workflow_dispatch:

permissions:
contents: read

jobs:
send_message:
build:
runs-on: ubuntu-latest
name: Say hello to your girlfriend every day

steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: master
ref: main

- name: sender
uses: actions/setup-python@v2
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10.0'
architecture: 'x64'
- run: pip install -r ./requirements.txt && python ./main.py
python-version: "3.10"

- name: Install pip
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run weather
run: |
python main.py
env:
APP_KEY: ${{ secrets.APP_KEY }}
Expand Down

0 comments on commit 7992592

Please sign in to comment.