From 7c2b552a6e32d6da81ebcaa4f285a0a41fd81b92 Mon Sep 17 00:00:00 2001 From: Florian Warzecha Date: Tue, 5 Jul 2022 08:45:41 +0200 Subject: [PATCH] fix: 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 b1c0c6048..767d15eb0 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"]