feat: use embed geoip database (#396)

* feat: use embed geoip database

* mention ipinfo

* only read once

* comments

comments

* chore: installer version

---------

Co-authored-by: naiba <hi@nai.ba>
This commit is contained in:
UUBulb
2024-07-28 13:59:58 +08:00
committed by GitHub
parent 9d96c58ff9
commit 26d81f6d7a
14 changed files with 261 additions and 48 deletions

View File

@@ -12,6 +12,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Fetch IPInfo GeoIP Database
env:
IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }}
run: |
rm pkg/geoip/geoip.db
wget -O pkg/geoip/geoip.db https://ipinfo.io/data/free/country.mmdb?token=${IPINFO_TOKEN}
- name: Extract branch name
run: |
export TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})

View File

@@ -13,4 +13,4 @@ jobs:
- name: Sync to Gitee
run: |
pip3 install PyGitHub
python3 .github/workflows/sync.py
python3 .github/sync.py