From ea31a79fe929214cacf592ee3c2ad79eb6835388 Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Thu, 20 Jun 2024 03:24:29 -0700 Subject: [PATCH] Fix build_android by setting git safe folders (#45065) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45065 This fix makes sure that Android runner can run git commands. This is porting in main the commit https://github.com/facebook/react-native/commit/fee215664287ddca31c8400c87a825c8e9822290 ## Changelog [Internal] - Make the build_android run git commands Reviewed By: cortinico Differential Revision: D58782969 fbshipit-source-id: ab35f7e3d1733ab770f2a397552daa1ec7c13cf7 --- .github/workflows/publish-release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 257c019a975..dbbf132723a 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -515,7 +515,9 @@ jobs: - name: Install dependencies run: yarn install --non-interactive - name: Set React Native Version - run: node ./scripts/releases/set-rn-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }} + run: | + git config --global --add safe.directory /__w/react-native/react-native + node ./scripts/releases/set-rn-version.js --build-type ${{ needs.set_release_type.outputs.RELEASE_TYPE }} - name: Setup gradle uses: ./.github/actions/setup-gradle - name: Build and publish all the Android Artifacts to /tmp/maven-local