mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-22 07:25:43 +08:00
fix(git): apply a workaround for git safe directory
This commit is contained in:
@@ -4,9 +4,6 @@ set -uxo pipefail
|
|||||||
# Avoid file expansion when passing parameters like with '*'
|
# Avoid file expansion when passing parameters like with '*'
|
||||||
set -o noglob
|
set -o noglob
|
||||||
|
|
||||||
# Disable safe directory checks
|
|
||||||
git config --global --add safe.directory '*'
|
|
||||||
|
|
||||||
OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"}
|
OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"}
|
||||||
|
|
||||||
# Create the output directory
|
# Create the output directory
|
||||||
@@ -16,6 +13,9 @@ mkdir -p "$(dirname $OUTPUT)"
|
|||||||
args=$(echo "$@" | xargs)
|
args=$(echo "$@" | xargs)
|
||||||
|
|
||||||
# Execute git-cliff
|
# Execute git-cliff
|
||||||
|
cp -r . /tmp/gitdir
|
||||||
|
mv /tmp/gitdir app
|
||||||
|
cd app
|
||||||
GIT_CLIFF_OUTPUT="$OUTPUT" git-cliff $args
|
GIT_CLIFF_OUTPUT="$OUTPUT" git-cliff $args
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user