2020-08-12 05:07:16 +00:00
|
|
|
name: Github commit to telegram
|
|
|
|
|
2020-11-07 16:17:37 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-08-12 05:07:16 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
# 此步骤使用 GitHub 的 https://github.com/actions/checkout
|
|
|
|
- name: checkout actions
|
2022-06-08 09:03:43 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-08-12 05:07:16 +00:00
|
|
|
|
|
|
|
# 设置python环境
|
|
|
|
# 此步骤使用 GitHub 的 https://github.com/actions/setup-python
|
2022-06-08 09:03:43 +00:00
|
|
|
- name: Set up Python 3.9
|
|
|
|
uses: actions/setup-python@v3
|
2020-08-12 05:07:16 +00:00
|
|
|
with:
|
2022-06-08 09:03:43 +00:00
|
|
|
python-version: 3.9
|
2020-08-12 05:07:16 +00:00
|
|
|
|
|
|
|
# 安装依赖
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-01-23 00:13:26 +00:00
|
|
|
mkdir tmp && cd tmp
|
2020-08-12 05:07:16 +00:00
|
|
|
python -m pip install --upgrade pip
|
2022-06-08 09:03:43 +00:00
|
|
|
pip install httpx
|
2020-08-12 05:07:16 +00:00
|
|
|
|
|
|
|
# 发送通知
|
|
|
|
- name: Send notice
|
2021-01-23 00:21:00 +00:00
|
|
|
run: |
|
2021-01-23 00:36:42 +00:00
|
|
|
cd tmp
|
|
|
|
cp ../telegram_update.py ./
|
|
|
|
python telegram_update.py ${{ secrets.TG_BOT_TOKEN }}
|