PagerMaid_Plugins_Pyro/.gitea/workflows/python.yml

55 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2022-06-08 08:58:40 +00:00
name: Github commit to telegram
on:
push:
branches:
- v2
2022-07-24 10:36:57 +00:00
paths-ignore:
- '**.md'
- '.github/**'
- 'list.json'
2023-07-01 12:07:18 +00:00
- 'alpha/list.json'
2022-07-24 10:36:57 +00:00
- 'telegram_update.py'
- 'update_list.py'
2022-11-27 09:02:29 +00:00
- 'telegraph_update.py'
2022-06-08 08:58:40 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
# 此步骤使用 GitHub 的 https://github.com/actions/checkout
2024-03-24 13:05:38 +00:00
- name: checkout gh
run: |
git clone https://${{ secrets.GH_PAT }}:@github.com/${{ gitea.repository }} .
2022-06-08 08:58:40 +00:00
# 设置python环境
# 此步骤使用 GitHub 的 https://github.com/actions/setup-python
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
# 安装依赖
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install httpx
# 发送通知
- name: Send notice
run: |
python telegram_update.py ${{ secrets.TG_BOT_TOKEN }}
2022-07-24 10:36:57 +00:00
# 更新 list
- name: Update list
run: |
python update_list.py
# Auto commit
2024-03-24 13:05:38 +00:00
- uses: stefanzweifel/git-auto-commit-action@v5
2022-07-24 10:36:57 +00:00
with:
# Optional. Commit message for the created commit.
# Defaults to "Apply automatic changes"
commit_message: "CI: Update version json"
2023-07-01 12:07:18 +00:00
file_pattern: 'list.json alpha/list.json'