Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
chicco785 authored Nov 8, 2023
1 parent 9ffc76a commit 57b11bd
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ else
fi

# generate
git config --global --add safe.directory ${GITHUB_WORKSPACE}
cd ${GITHUB_WORKSPACE}
git fetch
# git config --global --add safe.directory ${GITHUB_WORKSPACE}
# cd ${GITHUB_WORKSPACE}
# git fetch
SRC_FILES=$(git diff origin/${GITHUB_BASE_REF} --name-only | grep ".puml" || :)
for SRC_FILE in ${SRC_FILES}; do
java -jar /plantuml.jar $SRC_FILE -charset UTF-8
Expand All @@ -38,13 +38,9 @@ done
if [[ ! $(git status --porcelain) ]]; then
exit 0
fi
git config user.name "${GITHUB_ACTOR}"
git config user.email "${INPUT_BOTEMAIL}"
git checkout ${GITHUB_HEAD_REF}
git add .
git commit -m "add generated diagrams"
git push origin HEAD:${GITHUB_HEAD_REF}
echo "comitted png files"
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${INPUT_BOTEMAIL}"
git commit -am "add generated diagrams" || echo "No changes to commit"

# add review comment
if [[ "${INPUT_ENABLEREVIEWCOMMENT}" != "true" ]]; then
Expand Down

0 comments on commit 57b11bd

Please sign in to comment.