mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-16 11:42:15 +00:00
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
name: Github commit to telegram
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- v2
|
|
paths-ignore:
|
|
- '**.md'
|
|
- '.github/**'
|
|
- 'list.json'
|
|
- 'telegram_update.py'
|
|
- 'update_list.py'
|
|
- 'telegraph_update.py'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# 此步骤使用 GitHub 的 https://github.com/actions/checkout
|
|
- name: checkout actions
|
|
uses: actions/checkout@v3
|
|
|
|
# 设置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 }}
|
|
|
|
# 更新 list
|
|
- name: Update list
|
|
run: |
|
|
python update_list.py
|
|
|
|
# Auto commit
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
with:
|
|
# Optional. Commit message for the created commit.
|
|
# Defaults to "Apply automatic changes"
|
|
commit_message: "CI: Update version json"
|
|
file_pattern: 'list.json'
|