From e64394ed33e4530f9ed1f58f1ee8db60bff44083 Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Tue, 5 Jul 2022 08:45:41 +0200 Subject: [PATCH] tooling: git safe repo directory for docker image Fixes an issue introduced with a recent git update (https://github.blog/2022-04-12-git-security-vulnerability-announced/) with a common workaround (https://github.com/actions/checkout/pull/762, https://stackoverflow.com/questions/71901632/fatal-error-unsafe-repository-home-repon-is-owned-by-someone-else, https://github.com/actions/checkout/issues/760), by marking the /data directory inside the container as safe for git during the container build. --- .github/actions/alpine-pandoc-hugo/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/alpine-pandoc-hugo/Dockerfile b/.github/actions/alpine-pandoc-hugo/Dockerfile index b1c0c604..767d15eb 100644 --- a/.github/actions/alpine-pandoc-hugo/Dockerfile +++ b/.github/actions/alpine-pandoc-hugo/Dockerfile @@ -7,4 +7,6 @@ RUN apk --no-cache add ruby git COPY delete-script.rb /opt/delete-script.rb RUN chmod +x /opt/delete-script.rb +RUN git config --global --add safe.directory /data + ENTRYPOINT ["sh", "-c"]