mirror of
https://github.com/SagerNet/sing-geosite.git
synced 2025-02-06 12:52:42 +08:00
Add debug workflow
This commit is contained in:
parent
782ba35a59
commit
d80854f857
36
.github/workflows/build.yaml
vendored
Normal file
36
.github/workflows/build.yaml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
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
|
||||
with:
|
||||
go-version: ${{ steps.version.outputs.go_version }}
|
||||
- name: Build geosite
|
||||
id: build
|
||||
env:
|
||||
GOPRIVATE: github.com/sagernet
|
||||
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||
NO_SKIP: true
|
||||
run: |
|
||||
git config --global url."https://${{ secrets.ACCESS_TOKEN }}@github.com".insteadOf "https://github.com"
|
||||
go run -v .
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: geosite.db
|
||||
path: geosite.db
|
8
go.mod
8
go.mod
@ -3,19 +3,19 @@ module sing-geosite
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/golang/protobuf v1.5.2
|
||||
github.com/google/go-github/v45 v45.2.0
|
||||
github.com/sagernet/sing v0.0.0-20220704113227-8b990551511a
|
||||
github.com/sagernet/sing-box v0.0.0-20220704113958-f76102dab512
|
||||
github.com/sagernet/sing v0.0.0-20220705005401-57d12d875b7a
|
||||
github.com/sagernet/sing-box v0.0.0-20220705010535-8392567962ac
|
||||
github.com/sirupsen/logrus v1.8.1
|
||||
github.com/v2fly/v2ray-core/v5 v5.0.7
|
||||
google.golang.org/protobuf v1.28.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/adrg/xdg v0.4.0 // indirect
|
||||
github.com/goccy/go-json v0.9.8 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
|
||||
golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
)
|
||||
|
8
go.sum
8
go.sum
@ -17,10 +17,10 @@ github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD
|
||||
github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/sagernet/sing v0.0.0-20220704113227-8b990551511a h1:IvYjuvuPNmZzQfBbCxE/uQqGkNWUa5/KrEMIecRMjZk=
|
||||
github.com/sagernet/sing v0.0.0-20220704113227-8b990551511a/go.mod h1:3ZmoGNg/nNJTyHAZFNRSPaXpNIwpDvyIiAUd0KIWV5c=
|
||||
github.com/sagernet/sing-box v0.0.0-20220704113958-f76102dab512 h1:hZ/oWGx6Ff1HMqhCqmahvaW4W3gb83/jBhmWu1Cuf8Y=
|
||||
github.com/sagernet/sing-box v0.0.0-20220704113958-f76102dab512/go.mod h1:Yf1jgOxozYlIYCK2HFUzVf06U2wJP3RcTHl0XACFX/c=
|
||||
github.com/sagernet/sing v0.0.0-20220705005401-57d12d875b7a h1:FhrHCkox9scuTzcT5DDh6flVLFuqU+QSk3VONd41I+o=
|
||||
github.com/sagernet/sing v0.0.0-20220705005401-57d12d875b7a/go.mod h1:3ZmoGNg/nNJTyHAZFNRSPaXpNIwpDvyIiAUd0KIWV5c=
|
||||
github.com/sagernet/sing-box v0.0.0-20220705010535-8392567962ac h1:oGv23zqrGbSENOPCnUlT6s1L0ZGnksAZz6mNgJb7WOc=
|
||||
github.com/sagernet/sing-box v0.0.0-20220705010535-8392567962ac/go.mod h1:Y+TVnQmBOShqlXwZ5bQIByfV4CRERky24YWWy91XSe0=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
|
2
main.go
2
main.go
@ -154,7 +154,7 @@ func release(source string, destination string, output string) error {
|
||||
if err != nil {
|
||||
logrus.Warn("missing destination latest release")
|
||||
} else {
|
||||
if strings.Contains(*destinationRelease.Name, *sourceRelease.Name) {
|
||||
if os.Getenv("NO_SKIP") != "true" && strings.Contains(*destinationRelease.Name, *sourceRelease.Name) {
|
||||
logrus.Info("already latest")
|
||||
setActionOutput("skip", "true")
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user