From 7e15b9fd10eaeb4be8fb4639f4e1c8c252b6ed09 Mon Sep 17 00:00:00 2001 From: chris48s Date: Tue, 1 Aug 2023 19:26:18 +0100 Subject: [PATCH] fix 'draft release' action part 2 (#9434) --- .github/actions/draft-release/entrypoint.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/draft-release/entrypoint.sh b/.github/actions/draft-release/entrypoint.sh index 46de1f4384..b4518b3d5a 100755 --- a/.github/actions/draft-release/entrypoint.sh +++ b/.github/actions/draft-release/entrypoint.sh @@ -2,14 +2,17 @@ set -euxo pipefail -# Set up a git user -git config user.name "release[bot]" -git config user.email "actions@users.noreply.github.com" +# mark workspace dir as 'safe' +git config --system --add safe.directory '/github/workspace' # Find last server-YYYY-MM-DD tag git fetch --unshallow --tags LAST_TAG=$(git tag | grep server | tail -n 1) +# Set up a git user +git config user.name "release[bot]" +git config user.email "actions@users.noreply.github.com" + # Find the marker in CHANGELOG.md INSERT_POINT=$(grep -n "^\-\-\-$" CHANGELOG.md | cut -f1 -d:) INSERT_POINT=$((INSERT_POINT+1))