ci(new-templates): fix incorrect latest tag selection (#10846)

Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
Dwi Siswanto
2024-09-26 18:36:50 +07:00
committed by GitHub
parent 96bfa01458
commit a90f527c2e

View File

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