Skip to content

Update IP Addresses #11

Update IP Addresses

Update IP Addresses #11

Workflow file for this run

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."