forked from 1857112/get_v2
-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (40 loc) · 1.16 KB
/
get_v2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: 获取V2ray订阅
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:
jobs:
get_v2ray:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: 'Set up Python'
uses: actions/setup-python@v1
with:
python-version: 3.11
- name: 'Install requests'
run: |
pip install -r requirements.txt
- name: 设置githup信息
env:
email: ${{ secrets.EMAIL }}
username: ${{ secrets.USERNAME }}
run: |
git config --global user.name "$username"
git config --global user.email "$email"
- name: Run python script
run: |
python3 get_clash.py
- name: commit
run: |
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
git pull origin main
git add ./pub/*
git commit -m "$(date '+%Y-%m-%d %H:%M:%S')筛选节点"
- name: 推送更改
uses: ad-m/github-push-action@master
with:
# github_token: ${{ secrets.TOKEN }}
branch: main