Fix version for docker

This commit is contained in:
itdoginfo
2025-08-26 14:16:08 +03:00
parent 38991a803a
commit c509fd38c7
4 changed files with 14 additions and 3 deletions

View File

@@ -11,13 +11,21 @@ jobs:
steps:
- uses: actions/checkout@v4.2.1
with:
fetch-depth: '0'
fetch-depth: 0
- name: Extract version
id: version
run: |
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

View File

@@ -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

View File

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-podkop
PKG_VERSION := $(shell git describe --tags --exact-match 2>/dev/null || echo "dev_$(shell date +%d%m%Y)")
PKG_VERSION := $(if $(PKG_VERSION),$(PKG_VERSION),dev_$(shell date +%d%m%Y))
PKG_RELEASE:=1

View File

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=podkop
PKG_VERSION := $(shell git describe --tags --exact-match 2>/dev/null || echo "dev_$(shell date +%d%m%Y)")
PKG_VERSION := $(if $(PKG_VERSION),$(PKG_VERSION),dev_$(shell date +%d%m%Y))
PKG_RELEASE:=1