mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-22 07:25:43 +08:00
fix(action): revert working directory permissions after generating changelog
This commit is contained in:
@@ -5,7 +5,8 @@ set -uxo pipefail
|
|||||||
set -o noglob
|
set -o noglob
|
||||||
|
|
||||||
# Set up working directory
|
# Set up working directory
|
||||||
chown -R root:root .
|
owner=$(stat -c "%u:%g" .)
|
||||||
|
chown -R "$(id -u)" .
|
||||||
|
|
||||||
# Create the output directory
|
# Create the output directory
|
||||||
OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"}
|
OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"}
|
||||||
@@ -21,6 +22,9 @@ exit_code=$?
|
|||||||
# Output to console
|
# Output to console
|
||||||
cat "$OUTPUT"
|
cat "$OUTPUT"
|
||||||
|
|
||||||
|
# Revert permissions
|
||||||
|
chown -R "$owner" .
|
||||||
|
|
||||||
# Set the changelog content
|
# Set the changelog content
|
||||||
echo "content<<EOF" >> $GITHUB_OUTPUT
|
echo "content<<EOF" >> $GITHUB_OUTPUT
|
||||||
cat "$OUTPUT" >> $GITHUB_OUTPUT
|
cat "$OUTPUT" >> $GITHUB_OUTPUT
|
||||||
|
|||||||
Reference in New Issue
Block a user