From 39c3729524b100b7ef02375633ab58e4e10d8b3d Mon Sep 17 00:00:00 2001 From: Paul Pfeister Date: Wed, 17 Sep 2025 14:09:15 -0400 Subject: [PATCH] ci(exclusions): fix loss of untracked list --- .github/workflows/exclusions.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/exclusions.yml b/.github/workflows/exclusions.yml index 516aa67b..95b6180f 100644 --- a/.github/workflows/exclusions.yml +++ b/.github/workflows/exclusions.yml @@ -71,13 +71,18 @@ jobs: git config user.name "Paul Pfeister (automation)" git config user.email "code@pfeister.dev" - git add -f false_positive_exclusions.txt # -f required to override .gitignore - git stash push -m "stash false positive exclusion list" -- false_positive_exclusions.txt + mv false_positive_exclusions.txt false_positive_exclusions.txt.tmp + + git add -f false_positive_exclusions.txt.tmp # -f required to override .gitignore + git stash push -m "stash false positive exclusion list" -- false_positive_exclusions.txt.tmp git fetch origin exclusions || true # Allows creation of branch if deleted git checkout -B exclusions origin/exclusions || (git checkout --orphan exclusions && git rm -rf .) git stash pop || true + mv false_positive_exclusions.txt.tmp false_positive_exclusions.txt + + git add false_positive_exclusions.txt git commit -m "auto: update exclusions list" || echo "No changes to commit" git push origin exclusions