mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-08 20:46: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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4.2.1
|
- uses: actions/checkout@v4.2.1
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Check version match
|
- name: Extract version
|
||||||
|
id: version
|
||||||
run: |
|
run: |
|
||||||
PODKOP_VERSION=$(grep '^PKG_VERSION:=' podkop/Makefile | cut -d '=' -f 2)
|
VERSION=$(git describe --tags --exact-match 2>/dev/null || echo "dev_$(date +%d%m%Y)")
|
||||||
LUCI_APP_PODKOP_VERSION=$(grep '^PKG_VERSION:=' luci-app-podkop/Makefile | cut -d '=' -f 2)
|
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6.9.0
|
uses: docker/build-push-action@v6.9.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
tags: podkop:ci
|
tags: podkop:ci
|
||||||
|
build-args: |
|
||||||
|
PKG_VERSION=${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
- name: Create Docker container
|
- name: Create Docker container
|
||||||
run: docker create --name podkop podkop:ci
|
run: docker create --name podkop podkop:ci
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
FROM itdoginfo/openwrt-sdk:24.10.1
|
FROM itdoginfo/openwrt-sdk:24.10.1
|
||||||
|
|
||||||
|
ARG PKG_VERSION
|
||||||
|
ENV PKG_VERSION=${PKG_VERSION}
|
||||||
|
|
||||||
COPY ./podkop /builder/package/feeds/utilites/podkop
|
COPY ./podkop /builder/package/feeds/utilites/podkop
|
||||||
COPY ./luci-app-podkop /builder/package/feeds/luci/luci-app-podkop
|
COPY ./luci-app-podkop /builder/package/feeds/luci/luci-app-podkop
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-podkop
|
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
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI podkop app
|
LUCI_TITLE:=LuCI podkop app
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=podkop
|
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_RELEASE:=1
|
||||||
|
|
||||||
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
PKG_MAINTAINER:=ITDog <podkop@itdog.info>
|
||||||
|
|||||||
@@ -1763,16 +1763,12 @@ configure_remote_domain_list_handler() {
|
|||||||
local file_extension
|
local file_extension
|
||||||
file_extension=$(get_url_file_extension "$url")
|
file_extension=$(get_url_file_extension "$url")
|
||||||
case "$file_extension" in
|
case "$file_extension" in
|
||||||
lst)
|
|
||||||
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
|
||||||
;;
|
|
||||||
json|srs)
|
json|srs)
|
||||||
log "Detected file extension: .$file_extension → proceeding with processing"
|
log "Detected file extension: .$file_extension → proceeding with processing"
|
||||||
sing_box_add_remote_ruleset_and_rules "$url" "$section" "domains"
|
sing_box_add_remote_ruleset_and_rules "$url" "$section" "domains"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
log "Detected file extension: .$file_extension → unsupported, skipping"
|
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
||||||
return 1
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -1796,17 +1792,13 @@ configure_remote_subnet_list_handler() {
|
|||||||
local file_extension
|
local file_extension
|
||||||
file_extension=$(get_url_file_extension "$url")
|
file_extension=$(get_url_file_extension "$url")
|
||||||
case "$file_extension" in
|
case "$file_extension" in
|
||||||
lst)
|
|
||||||
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
|
||||||
;;
|
|
||||||
json|srs)
|
json|srs)
|
||||||
log "Detected file extension: .$file_extension → proceeding with processing"
|
log "Detected file extension: .$file_extension → proceeding with processing"
|
||||||
sing_box_add_remote_ruleset_and_rules "$url" "$section" "subnets"
|
sing_box_add_remote_ruleset_and_rules "$url" "$section" "subnets"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
log "Detected file extension: .$file_extension → unsupported, skipping"
|
log "Detected file extension: .$file_extension → no processing needed, managed on list_update"
|
||||||
return 1
|
;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1899,16 +1891,12 @@ import_domains_from_remote_domain_list_handler() {
|
|||||||
local file_extension
|
local file_extension
|
||||||
file_extension=$(get_url_file_extension "$url")
|
file_extension=$(get_url_file_extension "$url")
|
||||||
case "$file_extension" in
|
case "$file_extension" in
|
||||||
lst)
|
|
||||||
log "Detected file extension: .$file_extension → proceeding with processing"
|
|
||||||
import_domains_from_remote_lst_file "$url" "$section"
|
|
||||||
;;
|
|
||||||
json|srs)
|
json|srs)
|
||||||
log "Detected file extension: .$file_extension → no update needed, sing-box manages updates"
|
log "Detected file extension: .$file_extension → no update needed, sing-box manages updates"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
log "Detected file extension: .$file_extension → unsupported, skipping"
|
log "Detected file extension: .$file_extension → proceeding with processing"
|
||||||
return 1
|
import_domains_from_remote_lst_file "$url" "$section"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user