mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-22 07:25:43 +08:00
refactor(action): simplify git safe directory workaround
This commit is contained in:
@@ -5,10 +5,7 @@ set -uxo pipefail
|
|||||||
set -o noglob
|
set -o noglob
|
||||||
|
|
||||||
# Set up working directory
|
# Set up working directory
|
||||||
WORKDIR="app"
|
chown -R root:root .
|
||||||
cp -r . /tmp/gitdir
|
|
||||||
mv /tmp/gitdir "$WORKDIR"
|
|
||||||
cd "$WORKDIR" || exit
|
|
||||||
|
|
||||||
# Create the output directory
|
# Create the output directory
|
||||||
OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"}
|
OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"}
|
||||||
@@ -30,7 +27,6 @@ cat "$OUTPUT" >> $GITHUB_OUTPUT
|
|||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Set output file
|
# Set output file
|
||||||
OUTPUT="$WORKDIR/$OUTPUT"
|
|
||||||
echo "changelog=$OUTPUT" >> $GITHUB_OUTPUT
|
echo "changelog=$OUTPUT" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
# Pass exit code to the next step
|
# Pass exit code to the next step
|
||||||
|
|||||||
Reference in New Issue
Block a user