2020-01-05 03:28:32 +02:00
|
|
|
name: Build geosite.dat
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Setup Go 1.13
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.13
|
|
|
|
id: go
|
|
|
|
|
|
|
|
- name: Set $GOPATH and more variables
|
|
|
|
run: |
|
|
|
|
echo "::set-env name=NAME::$(date +%Y%m%d%H%M)"
|
|
|
|
echo "::set-env name=TAG_NAME::$(date +%Y%m%d%H%M)"
|
|
|
|
echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)"
|
|
|
|
echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Get geosite code
|
|
|
|
run: |
|
|
|
|
go get -u -v -insecure github.com/v2ray/domain-list-community
|
|
|
|
|
2020-01-25 12:02:55 +02:00
|
|
|
- name: Automatically generate ookla-speedtest sub-list from source
|
|
|
|
run: |
|
|
|
|
curl -L -o servers-source.xml "https://c.speedtest.net/speedtest-servers-static.php"
|
|
|
|
cat servers-source.xml | sed -nEe 's/.+host="(.+):[0-9]+".+/\L\1/p' | sort -u > hosts-with-ip.txt
|
2020-01-25 12:29:39 +02:00
|
|
|
sed -E '/^([0-9]{1,3}\.){3}[0-9]{1,3}$/d' hosts-with-ip.txt > hosts-without-ip.txt
|
|
|
|
cat hosts-without-ip.txt | awk '{print "full:$0\n"}' > $GOPATH/src/github.com/v2ray/domain-list-community/data/ookla-speedtest
|
|
|
|
echo "include:ookla-speedtest-ads" >> $GOPATH/src/github.com/v2ray/domain-list-community/data/ookla-speedtest
|
2020-01-25 12:02:55 +02:00
|
|
|
|
2020-01-05 03:28:32 +02:00
|
|
|
- name: Build geosite.dat file
|
|
|
|
run: |
|
|
|
|
domain-list-community
|
|
|
|
mkdir -p ./publish
|
2020-01-05 05:38:31 +02:00
|
|
|
mv ./dlc.dat ./publish/dlc.dat
|
2020-01-05 03:28:32 +02:00
|
|
|
|
|
|
|
- name: Release file
|
|
|
|
uses: Ricky-Hao/action-release@master
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
ASSET_PATH: publish
|