mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-08 12:36:50 +03:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cd990f8a3 | ||
|
|
c509fd38c7 | ||
|
|
38991a803a | ||
|
|
29c34e31db | ||
|
|
a77e8fae7d | ||
|
|
6d83737336 |
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -10,28 +10,22 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check version match
|
||||
- name: Extract version
|
||||
id: version
|
||||
run: |
|
||||
PODKOP_VERSION=$(grep '^PKG_VERSION:=' podkop/Makefile | cut -d '=' -f 2)
|
||||
LUCI_APP_PODKOP_VERSION=$(grep '^PKG_VERSION:=' luci-app-podkop/Makefile | cut -d '=' -f 2)
|
||||
|
||||
TAG_VERSION=${GITHUB_REF#refs/tags/v}
|
||||
|
||||
echo "Podkop version: $PODKOP_VERSION"
|
||||
echo "Luci-app-podkop version: $LUCI_APP_PODKOP_VERSION"
|
||||
echo "Tag version: $TAG_VERSION"
|
||||
|
||||
if [ "$PODKOP_VERSION" != "$TAG_VERSION" ] || [ "$LUCI_APP_PODKOP_VERSION" != "$TAG_VERSION" ]; then
|
||||
echo "Error: Version mismatch"
|
||||
exit 1
|
||||
fi
|
||||
VERSION=$(git describe --tags --exact-match 2>/dev/null || echo "dev_$(date +%d%m%Y)")
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6.9.0
|
||||
with:
|
||||
context: .
|
||||
tags: podkop:ci
|
||||
build-args: |
|
||||
PKG_VERSION=${{ steps.version.outputs.version }}
|
||||
|
||||
- name: Create Docker container
|
||||
run: docker create --name podkop podkop:ci
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
FROM itdoginfo/openwrt-sdk:24.10.1
|
||||
|
||||
ARG PKG_VERSION
|
||||
ENV PKG_VERSION=${PKG_VERSION}
|
||||
|
||||
COPY ./podkop /builder/package/feeds/utilites/podkop
|
||||
COPY ./luci-app-podkop /builder/package/feeds/luci/luci-app-podkop
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-podkop
|
||||
PKG_VERSION:=0.4.7
|
||||
|
||||
PKG_VERSION := $(if $(PKG_VERSION),$(PKG_VERSION),dev_$(shell date +%d%m%Y))
|
||||
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LUCI_TITLE:=LuCI podkop app
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=podkop
|
||||
PKG_VERSION:=0.4.7
|
||||
|
||||
PKG_VERSION := $(if $(PKG_VERSION),$(PKG_VERSION),dev_$(shell date +%d%m%Y))
|
||||
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
||||
|
||||
@@ -1763,16 +1763,12 @@ configure_remote_domain_list_handler() {
|
||||
local file_extension
|
||||
file_extension=$(get_url_file_extension "$url")
|
||||
case "$file_extension" in
|
||||
lst)
|
||||
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
||||
;;
|
||||
json|srs)
|
||||
log "Detected file extension: .$file_extension → proceeding with processing"
|
||||
sing_box_add_remote_ruleset_and_rules "$url" "$section" "domains"
|
||||
;;
|
||||
*)
|
||||
log "Detected file extension: .$file_extension → unsupported, skipping"
|
||||
return 1
|
||||
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
@@ -1796,17 +1792,13 @@ configure_remote_subnet_list_handler() {
|
||||
local file_extension
|
||||
file_extension=$(get_url_file_extension "$url")
|
||||
case "$file_extension" in
|
||||
lst)
|
||||
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
||||
;;
|
||||
json|srs)
|
||||
log "Detected file extension: .$file_extension → proceeding with processing"
|
||||
sing_box_add_remote_ruleset_and_rules "$url" "$section" "subnets"
|
||||
;;
|
||||
*)
|
||||
log "Detected file extension: .$file_extension → unsupported, skipping"
|
||||
return 1
|
||||
;;
|
||||
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -1899,16 +1891,12 @@ import_domains_from_remote_domain_list_handler() {
|
||||
local file_extension
|
||||
file_extension=$(get_url_file_extension "$url")
|
||||
case "$file_extension" in
|
||||
lst)
|
||||
log "Detected file extension: .$file_extension → proceeding with processing"
|
||||
import_domains_from_remote_lst_file "$url" "$section"
|
||||
;;
|
||||
json|srs)
|
||||
log "Detected file extension: .$file_extension → no update needed, sing-box manages updates"
|
||||
;;
|
||||
*)
|
||||
log "Detected file extension: .$file_extension → unsupported, skipping"
|
||||
return 1
|
||||
log "Detected file extension: .$file_extension → proceeding with processing"
|
||||
import_domains_from_remote_lst_file "$url" "$section"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user