summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorLoyalsoldier <[email protected]>2024-08-09 09:12:44 +0800
committerLoyalsoldier <[email protected]>2024-08-09 09:26:08 +0800
commit4f49a2a7e90a722531ef8eb9ecfee418747fab40 (patch)
treec15a896cc40df6d18d229a020c23b2101823a7a1 /.github/workflows
parentcdc2a64942ccf0232293e445993477b433b1d3be (diff)
Feat: get ASN data from MaxMind GeoLite2 ASN CSV instead of ripe.net
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml13
1 files changed, 6 insertions, 7 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7ba6ab3d..f3ff506c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -33,13 +33,9 @@ jobs:
echo "RELEASE_NAME=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV
shell: bash
- - name: Fetch lists from ripe.net
- run: |
- chmod +x asn.sh
- ./asn.sh
-
- name: Append more CIDRs
run: |
+ mkdir -p data
curl -sSL https://www.gstatic.com/ipranges/goog.json | jq --raw-output '.prefixes[].ipv4Prefix,.prefixes[].ipv6Prefix | select(. != null)' >> data/google
curl -sSL https://www.gstatic.com/ipranges/cloud.json | jq --raw-output '.prefixes[].ipv4Prefix,.prefixes[].ipv6Prefix | select(. != null)' >> data/google
curl -sSL https://api.fastly.com/public-ip-list | jq --raw-output '.addresses[],.ipv6_addresses[]' >> data/fastly
@@ -50,9 +46,12 @@ jobs:
LICENSE_KEY: ${{ secrets.MAXMIND_GEOLITE2_LICENSE }}
run: |
curl -L "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&license_key=${LICENSE_KEY}&suffix=zip" -o GeoLite2-Country-CSV.zip
+ curl -L "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-ASN-CSV&license_key=${LICENSE_KEY}&suffix=zip" -o GeoLite2-ASN-CSV.zip
+ mkdir -p geolite2
unzip GeoLite2-Country-CSV.zip
- rm -f GeoLite2-Country-CSV.zip
- mv GeoLite2* geolite2
+ unzip GeoLite2-ASN-CSV.zip
+ cp GeoLite2-Country-CSV_*/*.csv geolite2/
+ cp GeoLite2-ASN-CSV_*/*.csv geolite2/
- name: Build geoip files
run: |