Skip to content

Update main.yml

Update main.yml #8

Workflow file for this run

name: Daily Update qqwry geolite
on:
push:
branches:
- main
schedule:
- cron: '0 12 * * *'
env:
innoextract_version: 1.9
arch: amd64
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests
pip install bs4
- name: Update qqwry.dat
shell: pwsh
run: |
python qqwry.py
unzip *.zip setup.exe
chmod +x innoextract
./innoextract setup.exe -I qqwry.dat
mv app/qqwry.dat qqwry/qqwry.dat
rm -rf setup.exe
rm -rf *.zip*
rm -rf app/
- name: Update GeoLite2-ASN
run: cd geolite && wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-ASN.mmdb -O GeoLite2-ASN.mmdb
- name: Update GeoLite2-City
run: cd geolite && wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-City.mmdb -O GeoLite2-City.mmdb
- name: Update GeoLite2-City
run: cd geolite && wget https://github.com/P3TERX/GeoLite.mmdb/raw/download/GeoLite2-Country.mmdb -O GeoLite2-Country.mmdb
- name: Update ip2region
run: |
git clone https://gitee.com/lionsoul/ip2region lionsoul
mv lionsoul/data/ip2region.xdb ip2region/ip2region.xdb
- name: Commit and Push changes
run: |
echo $(date +'%Y%m%d') > date.txt
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -am "$(date +'%Y%m%d')"
git push -v --progress