From 0e54d2493a940ca46d54b316b944d13fab54c537 Mon Sep 17 00:00:00 2001 From: IvanildoBarauna Date: Wed, 4 Mar 2026 22:23:44 -0300 Subject: [PATCH] fix: Exclude infra/docs paths from rollback revert Align rollback with deploy paths-ignore so that .github/, docs/, tests/, markdown files and other non-application paths are not reverted during a rollback, preventing unintended changes to workflows and docs. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/rollback.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rollback.yml b/.github/workflows/rollback.yml index 13c8cdc..179b767 100644 --- a/.github/workflows/rollback.yml +++ b/.github/workflows/rollback.yml @@ -171,9 +171,13 @@ jobs: # Start from main HEAD (not from the tag) git checkout -b ${PR_BRANCH} main - # Replace all tracked files with the content from the rollback tag + # Replace application files with the content from the rollback tag, + # excluding infrastructure/docs paths (aligned with deploy paths-ignore) git checkout ${ROLLBACK_TAG} -- . + # Restore paths that should NOT be rolled back (same as deploy paths-ignore) + git checkout main -- .github/ docs/ tests/ README.md CHANGELOG.md LICENSE docker-compose.local.yaml '*.md' 2>/dev/null || true + # Check if there are actual differences if git diff --cached --quiet && git diff --quiet; then echo "WARNING: No differences between main and ${ROLLBACK_TAG}. Nothing to rollback."