From c028e04b0d36adc5f072e99aac59811a6b304b3f Mon Sep 17 00:00:00 2001 From: muava12 Date: Sun, 22 Feb 2026 12:03:36 +0800 Subject: [PATCH] ci(actions): fix version suffix accumulation in build-arm64 This commit modifies the version determination step to strip any existing '-fork-[0-9]+' suffixes from the base Git tag before appending the new run number. This prevents tags from accumulating incorrectly (e.g. from 'v0.1.2-fork-02-fork-04'). --- .github/workflows/build-arm64.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-arm64.yml b/.github/workflows/build-arm64.yml index 8a633e4c5..083f99c3f 100644 --- a/.github/workflows/build-arm64.yml +++ b/.github/workflows/build-arm64.yml @@ -37,16 +37,19 @@ jobs: - name: Determine Fork Version id: version run: | - # Dapatkan tag terbaru dari repo asli (misal: v0.1.2) + # Dapatkan tag terbaru dari history (mungkin sudah ada akhiran -fork) LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") + # Hilangkan akhiran -fork-* agar kita mendapatkan base version aslinya (misal: v0.1.2) + BASE_TAG=$(echo "$LATEST_TAG" | sed -E 's/-fork-[0-9]+//g') + # Format increment number menggunakan run number (misal: 01, 02) RUN_NUM=$(printf "%02d" ${{ github.run_number }}) # Gabungkan menjadi versi custom untuk fork - FORK_VERSION="${LATEST_TAG}-fork-${RUN_NUM}" + FORK_VERSION="${BASE_TAG}-fork-${RUN_NUM}" - echo "Ditemukan tag upstream: $LATEST_TAG" + echo "Ditemukan tag asli: $BASE_TAG" echo "Versi fork yang digunakan: $FORK_VERSION" echo "FORK_VERSION=$FORK_VERSION" >> $GITHUB_ENV