diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 98a87df..278d03b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,8 +2,8 @@ name: Build and Push to GHCR on: push: - tags: - - '*' + branches: + - dev workflow_dispatch: jobs: diff --git a/api/controller/default.go b/api/controller/default.go index 07e2785..38c1a53 100644 --- a/api/controller/default.go +++ b/api/controller/default.go @@ -107,11 +107,11 @@ func BuildSub(query validator.SubQuery, template string) ( func MergeSubAndTemplate(temp *model.Subscription, sub *model.Subscription) { // 只合并节点、策略组 // 统计所有国家策略组名称 - var newCountryGroupNames []string + var countryGroupNames []string for _, proxyGroup := range sub.ProxyGroups { if proxyGroup.IsCountryGrop { - newCountryGroupNames = append( - newCountryGroupNames, proxyGroup.Name, + countryGroupNames = append( + countryGroupNames, proxyGroup.Name, ) } } @@ -119,8 +119,7 @@ func MergeSubAndTemplate(temp *model.Subscription, sub *model.Subscription) { temp.Proxies = append(temp.Proxies, sub.Proxies...) // 将订阅中的策略组添加到模板中 for i := range temp.ProxyGroups { - temp.ProxyGroups[i].Proxies = append(temp.ProxyGroups[i].Proxies, newCountryGroupNames...) + temp.ProxyGroups[i].Proxies = append(temp.ProxyGroups[i].Proxies, countryGroupNames...) } temp.ProxyGroups = append(temp.ProxyGroups, sub.ProxyGroups...) - temp.Rules = append(temp.Rules, sub.Rules...) }