From bf32b53d9141e3b96c73001b1108e2006d14dc40 Mon Sep 17 00:00:00 2001 From: Jason Myers Date: Tue, 12 Apr 2022 21:17:11 -0500 Subject: [PATCH 1/3] Mark /github/workspace as a safe directory in git --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d281355..40d16c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ LABEL repository="https://github.com/jaumann/github-bumpversion-action" LABEL homepage="https://github.com/jaumann/github-bumpversion-action" # Install our pre-reqs -RUN apk add --no-cache git bash curl jq +RUN apk add --no-cache git bash curl jq && git config --global --add safe.directory /github/workspace # Check to make sure pip is fully upgraded RUN pip install --no-cache-dir -U pip From 2543764492faa443776531f956b65aade0c84988 Mon Sep 17 00:00:00 2001 From: Jason Myers Date: Thu, 14 Apr 2022 05:56:45 -0500 Subject: [PATCH 2/3] Update Dockerfile Moving git config to entry point --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 40d16c4..d281355 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ LABEL repository="https://github.com/jaumann/github-bumpversion-action" LABEL homepage="https://github.com/jaumann/github-bumpversion-action" # Install our pre-reqs -RUN apk add --no-cache git bash curl jq && git config --global --add safe.directory /github/workspace +RUN apk add --no-cache git bash curl jq # Check to make sure pip is fully upgraded RUN pip install --no-cache-dir -U pip From a59c420d2e0b298ebf61ad275a52aa06b6cf9fac Mon Sep 17 00:00:00 2001 From: Jason Myers Date: Thu, 14 Apr 2022 05:57:20 -0500 Subject: [PATCH 3/3] Update entrypoint.sh Adding git safe directory --- entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 47dcd3b..1eb9dc5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,6 +6,8 @@ source=${SOURCE:-.} dryrun=${DRY_RUN:-false} new_version=${NEW_VERSION:-""} +git config --global --add safe.directory /github/workspace + cd "${GITHUB_WORKSPACE}/${source}" || return # get latest tag that looks like a semver (with or without v)