From a90f527c2ec4088110c5756ad2d607f444871d76 Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Thu, 26 Sep 2024 18:36:50 +0700 Subject: [PATCH] ci(new-templates): fix incorrect latest tag selection (#10846) Signed-off-by: Dwi Siswanto --- .github/workflows/new-templates.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/new-templates.yml b/.github/workflows/new-templates.yml index 9f3f3d6494a..a401c8dd751 100644 --- a/.github/workflows/new-templates.yml +++ b/.github/workflows/new-templates.yml @@ -22,7 +22,9 @@ jobs: with: fetch-depth: 0 - name: Generate new addition list - run: git diff --name-only --diff-filter=A $(git tag | tail -n 1) @ . | grep -v "^\.github/" | grep "\.yaml$" | tee $NEW_ADDITION_FILE + run: | + LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`) + git diff --name-only --diff-filter=A $LATEST_TAG @ . | grep -v "^\.github/" | grep "\.yaml$" | tee $NEW_ADDITION_FILE - uses: projectdiscovery/actions/setup/git@v1 - uses: projectdiscovery/actions/commit@v1 with: