From 128329cb854c429262677fd2489fdda4f9b17b22 Mon Sep 17 00:00:00 2001 From: Brad Cowie Date: Sat, 8 Apr 2023 22:03:32 +1200 Subject: [PATCH] Set git safe.directory in entrypoint.sh. --- Dockerfile | 1 - entrypoint.sh | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3557a6e..446ec57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ RUN apt-get update && \ jq \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ - && git config --global --add safe.directory '*' \ && python3 -m venv /opt/venv \ && /opt/venv/bin/pip --no-cache-dir --no-input install --upgrade --requirement /requirements.txt diff --git a/entrypoint.sh b/entrypoint.sh index 69666c3..41dc122 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -48,6 +48,7 @@ else GITHUB_SHA="$(jq -r .pull_request.head.sha < "${GITHUB_EVENT_PATH}")" fi + git config --global --add safe.directory "${GITHUB_WORKSPACE}" git checkout --quiet "${DEFAULT_BRANCH}" git checkout --quiet "${GITHUB_SHA}"