-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (47 loc) · 1.32 KB
/
noko.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
52
53
name: Update IP Addresses
on:
schedule:
- cron: '0 0 */3 * *'
workflow_dispatch:
jobs:
update_domains:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup WireGuard
run: |
sudo apt-get update
sudo apt-get install -y wireguard resolvconf
echo "${{ secrets.WIREGUARD_CONFIG }}" > wg0.conf
sudo mv wg0.conf /etc/wireguard/wg0.conf
sudo wg-quick up wg0
shell: bash
continue-on-error: false
- name: Download and Split
run: |
curl --insecure -o ip "${{ secrets.IP_SOURCE_URL }}"
mkdir -p address
split -l 2500000 -d ip address/chunk
shell: bash
continue-on-error: false
- name: KillGuard
run: |
sudo wg-quick down wg0
shell: bash
continue-on-error: false
- name: Git stuff
run: |
git config user.name "${{ secrets.GHUB_USERNAME }}"
git config user.email "${{ secrets.GHUB_EMAIL }}"
- name: Commit and Push
env:
GHUB_TOKEN: ${{ secrets.GHUB_TOKEN }}
run: |
git add address/
git commit -m "[Auto] Update IP Addresses"
git push -u origin main
shell: bash
continue-on-error: false
- name: Success maybe
run: echo "Script completed successfully."