mirror of
https://github.com/SagerNet/sing-geosite.git
synced 2026-06-22 12:54:19 +08:00
Update ...
This commit is contained in:
parent
4a32d56c17
commit
defea1502f
10
.github/dependabot.yml
vendored
Normal file
10
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gomod"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
12
.github/workflows/build.yaml
vendored
12
.github/workflows/build.yaml
vendored
@ -9,17 +9,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get latest go version
|
||||
id: version
|
||||
run: |
|
||||
echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ steps.version.outputs.go_version }}
|
||||
go-version: '1.18'
|
||||
- name: Build geosite
|
||||
id: build
|
||||
env:
|
||||
@ -30,4 +26,4 @@ jobs:
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: geosite.db
|
||||
path: geosite.db
|
||||
path: geosite.db
|
||||
|
||||
12
.github/workflows/release.yaml
vendored
12
.github/workflows/release.yaml
vendored
@ -9,17 +9,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Get latest go version
|
||||
id: version
|
||||
run: |
|
||||
echo ::set-output name=go_version::$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ steps.version.outputs.go_version }}
|
||||
go-version: '1.18'
|
||||
- name: Build geosite
|
||||
id: build
|
||||
run: |
|
||||
@ -58,4 +54,4 @@ jobs:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./geosite.db.sha256sum
|
||||
asset_name: geosite.db.sha256sum
|
||||
asset_content_type: text/plain
|
||||
asset_content_type: text/plain
|
||||
|
||||
6
main.go
6
main.go
@ -54,10 +54,10 @@ func get(downloadURL *string) ([]byte, error) {
|
||||
|
||||
func download(release *github.RepositoryRelease) ([]byte, error) {
|
||||
geositeAsset := common.Find(release.Assets, func(it *github.ReleaseAsset) bool {
|
||||
return *it.Name == "dlc.dat"
|
||||
return *it.Name == "geosite.dat"
|
||||
})
|
||||
geositeChecksumAsset := common.Find(release.Assets, func(it *github.ReleaseAsset) bool {
|
||||
return *it.Name == "dlc.dat.sha256sum"
|
||||
return *it.Name == "geosite.dat.sha256sum"
|
||||
})
|
||||
if geositeAsset == nil {
|
||||
return nil, E.New("geosite asset not found in upstream release ", release.Name)
|
||||
@ -212,7 +212,7 @@ func release(source string, destination string, output string) error {
|
||||
}
|
||||
|
||||
func main() {
|
||||
err := release("v2fly/domain-list-community", "sagernet/sing-geosite", "geosite.db")
|
||||
err := release("Loyalsoldier/v2ray-rules-dat", "immll/sing-geosite", "geosite.db")
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user