-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (30 loc) · 938 Bytes
/
main.yml
File metadata and controls
36 lines (30 loc) · 938 Bytes
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
name: Update Proxies every 60 Minutes
on:
schedule:
- cron: '*/60 * * * *'
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
working-directory: ./app
run: pip install -r requirements.txt
- name: Run Python script
working-directory: ./app
run: python main.py
- name: Commit and push changes
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "🔄 Auto update proxies [$(date +'%Y-%m-%d %H:%M')]"
git push