Skip to content

Commit

Permalink
fix(action): revert working directory permissions after generating ch…
Browse files Browse the repository at this point in the history
…angelog
  • Loading branch information
orhun committed Dec 21, 2022
1 parent df3d46f commit 970cdaa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -uxo pipefail
set -o noglob

# Set up working directory
chown -R root:root .
owner=$(stat -c "%u:%g" .)
chown -R "$(id -u)" .

# Create the output directory
OUTPUT=${OUTPUT:="git-cliff/CHANGELOG.md"}
Expand All @@ -21,6 +22,9 @@ exit_code=$?
# Output to console
cat "$OUTPUT"

# Revert permissions
chown -R "$owner" .

# Set the changelog content
echo "content<<EOF" >> $GITHUB_OUTPUT
cat "$OUTPUT" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 970cdaa

Please sign in to comment.