-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (35 loc) · 1.06 KB
/
schedule.yml
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
43
44
45
46
47
48
49
50
51
name: Update proxies
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *' # to run every hour
permissions:
contents: write
jobs:
update:
name: Update the files
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.TTK }}
author: LogiqueBot
workdir_name: ../workdir
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1 # Fetch all history for git push/rebase
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Clean proxies folder
run: rm -rf ${{github.workspace}}/proxies
- name: Run updater
run: python3 updater/updater.py "${{github.workspace}}"
- name: Run checker
run: python3 checker/checker.py
- name: Commit changes
run: |
git config --global user.name "${{ env.author }}"
git config --global user.email "[email protected]"
git add proxies
git commit -a -m "Updated at $(TZ='Asia/Tehran' date '+%Y-%m-%d %H:%M %Z')" --allow-empty
git push --force