Skip to content

sub_merge

sub_merge #751

Workflow file for this run

name: sub_merge
# 触发条件
on:
workflow_dispatch:
schedule:
# - cron: '*/5 * * * *'
# 表达式生成 https://crontab.guru/
- cron: '0 */3 * * *'
jobs:
deploy:
runs-on: self-hosted
steps:
- name: 迁出代码
uses: actions/checkout@v2
- name: 安装Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: 加载缓存
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/run_in_Actions/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: 设置时区
run: sudo timedatectl set-timezone 'Asia/Shanghai'
- name: 安装依赖
run: |
pip install -r ./requirements.txt
- name: 执行任务
run: |
python ./TG_proxy_main.py
- name: 提交更改
run: |
git config --local user.email '${{ secrets.EMAIL }}'
git config --local user.name '${{ secrets.NAME }}'
git pull origin main
git add ./sub/*
git add ./Long_term_subscription1
git add ./Long_term_subscription2
git add ./Long_term_subscription3
git add ./Long_term_subscription4
git add ./Long_term_subscription5
git add ./Long_term_subscription6
git add ./Long_term_subscription7
git add ./Long_term_subscription8
git add ./Long_term_subscription_num
git add ./Long_term_subscription_try
git add ./Long_term_subscription1.yaml
git add ./Long_term_subscription2.yaml
git add ./Long_term_subscription3.yaml
git add ./README.md
git commit -m "$(date '+%Y-%m-%d %H:%M:%S') sub_merge_node"
- name: 推送更改
uses: ad-m/github-push-action@master
with:
branch: main