Skip to content

Commit

Permalink
= Fix #28
Browse files Browse the repository at this point in the history
- Command `git config --local` was causing issues

The GitHub Action account email was set as global git configuration inside the container.
That configuration indicates the GitHub Action bot as the author of the commits in the gh-pages branch.
  • Loading branch information
manoelcampos committed Jun 2, 2022
1 parent 0f403e0 commit 638d24f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ echo "Configure git"
apk add git -q > /dev/null
apk add openssh-client -q > /dev/null

# Changes in gh-pages branch will be shown as the "GitHub Action" user.
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git config --global --add safe.directory /github/workspace

# Gets latest commit hash for pushed branch
COMMIT_HASH=$(git rev-parse HEAD)
Expand Down Expand Up @@ -92,6 +90,10 @@ if [[ $INPUT_SLIDES_BUILD == true ]]; then
git add -f "$SLIDES_FILE";
fi

# Changes in gh-pages branch will be shown as the "GitHub Action" user.
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"

MSG="Build $INPUT_ADOC_FILE_EXT Files for GitHub Pages from $COMMIT_HASH"
git rm -rf .github/ || true
echo "Committing changes to gh-pages branch"
Expand Down

0 comments on commit 638d24f

Please sign in to comment.