From c15bc2a1e0fa6918caa6757ceb3295914e4f0960 Mon Sep 17 00:00:00 2001 From: Daniel Gorgan Date: Wed, 13 Aug 2025 23:56:20 +0300 Subject: [PATCH 1/5] Mark /app as safe directory for Git In my github actions I got error ``` The repository at "/app" does not have the correct ownership and git refuses to use it: fatal: detected dubious ownership in repository at '/app' To add an exception for this directory, call: git config --global --add safe.directory /app ``` This PR fixes the issue by adding an actions to mark /app directory as safe for git. --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e49a4b223..7c28934e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,9 @@ jobs: - name: Start services run: docker compose up --wait --no-build + - + name: Mark /app as safe directory for Git + run: docker compose exec -T php git config --global --add safe.directory /app - name: Check HTTP reachability run: curl -v --fail-with-body http://localhost From 6420824572cb9872f201035150096866b5a14fe5 Mon Sep 17 00:00:00 2001 From: Daniel Gorgan Date: Thu, 14 Aug 2025 10:55:04 +0300 Subject: [PATCH 2/5] Update ci.yml --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c28934e3..e49a4b223 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,9 +38,6 @@ jobs: - name: Start services run: docker compose up --wait --no-build - - - name: Mark /app as safe directory for Git - run: docker compose exec -T php git config --global --add safe.directory /app - name: Check HTTP reachability run: curl -v --fail-with-body http://localhost From 02d984df38482bcacd2b2d92199e4caad16f05cc Mon Sep 17 00:00:00 2001 From: Daniel Gorgan Date: Thu, 14 Aug 2025 10:55:36 +0300 Subject: [PATCH 3/5] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 94441b57e..150e8c3c1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,6 +60,7 @@ ENV APP_ENV=dev ENV XDEBUG_MODE=off ENV FRANKENPHP_WORKER_CONFIG=watch +RUN git config --global --add safe.directory /app RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" RUN set -eux; \ From 42593da0bc48ca4d73b62229b74f390736979e5a Mon Sep 17 00:00:00 2001 From: Daniel Gorgan Date: Thu, 14 Aug 2025 10:58:00 +0300 Subject: [PATCH 4/5] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 150e8c3c1..61e783846 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,7 @@ ENV XDEBUG_MODE=off ENV FRANKENPHP_WORKER_CONFIG=watch RUN git config --global --add safe.directory /app + RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" RUN set -eux; \ From 0967950cfccece48ebe7ef9317acd10d4d3b6931 Mon Sep 17 00:00:00 2001 From: Daniel Gorgan Date: Thu, 14 Aug 2025 11:09:20 +0300 Subject: [PATCH 5/5] Update Dockerfile --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 61e783846..61989a95c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,9 +60,9 @@ ENV APP_ENV=dev ENV XDEBUG_MODE=off ENV FRANKENPHP_WORKER_CONFIG=watch -RUN git config --global --add safe.directory /app - -RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" +RUN set -eux; \ + git config --global --add safe.directory /app; \ + mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" RUN set -eux; \ install-php-extensions \