diff --git a/.github/.container-structure-test-config.yaml b/.github/.container-structure-test-config.yaml index 37ee6adf2..13880816f 100644 --- a/.github/.container-structure-test-config.yaml +++ b/.github/.container-structure-test-config.yaml @@ -1,5 +1,10 @@ schemaVersion: '2.0.0' commandTests: + - name: "git" + command: "git" + args: ["--version"] + expectedOutput: ["^git version 2\\.[0-9]+\\.[0-9]+\\n$"] + - name: "pre-commit" command: "pre-commit" args: ["-V"] diff --git a/Dockerfile b/Dockerfile index c54940605..434c07ba5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -182,7 +182,10 @@ RUN if [ "$(grep -o '^terraform-docs SKIPPED$' /usr/bin/tools_versions_info)" = ; fi && \ if [ "$(grep -o '^infracost SKIPPED$' /usr/bin/tools_versions_info)" = "" ]; then \ apk add --no-cache jq=~1 \ - ; fi + ; fi && \ + # Fix git runtime fatal: + # unsafe repository ('/lint' is owned by someone else) + git config --global --add safe.directory /lint ENV PRE_COMMIT_COLOR=${PRE_COMMIT_COLOR:-always}