From 898f3ad70b26b4b27fe09fd2c91fab6b3f797aee Mon Sep 17 00:00:00 2001 From: andreykropotov Date: Wed, 30 Sep 2026 19:04:30 +0400 Subject: [PATCH] fix(sync): a release without changes in the path no longer fails the sync The React Native sync counts changed files in the path with grep -c, which prints 0 but exits 1 when nothing matches. The step runs under bash -e, so every release that did not touch the path ended in a failed sync run instead of a quiet no-op. The count now tolerates no matches. --- .github/workflows/reusable-rn-synchronization.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-rn-synchronization.yml b/.github/workflows/reusable-rn-synchronization.yml index 813ef1a9..43613c17 100644 --- a/.github/workflows/reusable-rn-synchronization.yml +++ b/.github/workflows/reusable-rn-synchronization.yml @@ -68,11 +68,13 @@ jobs: - id: changed_files uses: tj-actions/changed-files@v42 + # grep -c prints 0 but exits 1 when nothing matches; under bash -e that + # failed the run for every release without changes in the path. - name: Determine if changes are in the specified path run: | path_changes_count="$(printf '%s' \ '${{ steps.changed_files.outputs.all_changed_files }}' | \ - grep -F -c '${{ inputs.changeLookUpPath }}')" + grep -F -c '${{ inputs.changeLookUpPath }}' || true)" echo "path_changes=$path_changes_count" >> "$GITHUB_ENV" - name: Check out remote repository if changes