Skip to content

Commit

Permalink
Setup git config --global --add safe.directory '*' when running job…
Browse files Browse the repository at this point in the history
…s inside Docker (#45231)

Summary:
Pull Request resolved: #45231

Following up to cipolleschi's work, it turns out that me setting this command inside
the docker file for React Android is unneffective:
react-native-community/docker-android#228

The reason is that the user executing is different (1001 for the Dockerfile, while GHA executes as root 1000).
So we need to set this, otherwise the nightlies will be invoked with the `-TEMP` prefix:

Changelog:
[Internal] [Changed] - Setup `git config --global --add safe.directory '*'` when running jobs inside Docker

Reviewed By: blakef

Differential Revision: D59223862

fbshipit-source-id: 26674fc8cdaebf6687407072cc4e4f5c38246845
  • Loading branch information
cortinico authored and facebook-github-bot committed Jul 1, 2024
1 parent de7976c commit c911c89
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
Expand Down Expand Up @@ -576,6 +578,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Create /tmp/hermes/osx-bin directory
run: mkdir -p /tmp/hermes/osx-bin
- name: Download osx-bin release artifacts
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
Expand Down Expand Up @@ -573,6 +575,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Create /tmp/hermes/osx-bin directory
run: mkdir -p /tmp/hermes/osx-bin
- name: Download osx-bin release artifacts
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Install dependencies
Expand Down Expand Up @@ -654,6 +656,8 @@ jobs:
echo '|1|If6MU203eXTaaWL678YEfWkVMrw=|kqLeIAyTy8pzpj8x8Ae4Fr8Mtlc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Create /tmp/hermes/osx-bin directory
run: mkdir -p /tmp/hermes/osx-bin
- name: Download osx-bin release artifacts
Expand Down Expand Up @@ -820,6 +824,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup git safe folders
run: git config --global --add safe.directory '*'
- name: Cache setup
id: cache_setup
uses: ./.github/actions/cache_setup
Expand Down

0 comments on commit c911c89

Please sign in to comment.