Skip to content

Update Domains

Update Domains #31

Workflow file for this run

name: Update Domains
on:
schedule:
- cron: '0 0 */2 * *'
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 domains "${{ secrets.SOURCE_URL }}"
mkdir -p domain
split -l 2500000 -d domains domain/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 domain/
git commit -m "[Auto] Update Domains"
git push -u origin main
shell: bash
continue-on-error: false
- name: Success maybe
run: echo "Script completed successfully."