Skip to content

Commit

Permalink
ci: update CircleCI config to use committer's identity for Git operat…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
raffaele-oplabs committed Dec 23, 2024
1 parent 6759fe6 commit 4f78675
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,15 @@ jobs:
command: |
pages_branch="gh-pages-test"
git config --global user.email "circleci-"
git config --global user.name "CircleCI Bot"
SOURCE_COMMIT=$(git rev-parse HEAD)
SOURCE_REPO="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
COMMIT_USER_NAME=$(git log -1 --pretty=format:'%an')
COMMIT_USER_EMAIL=$(git log -1 --pretty=format:'%ae')
# Git operations with committer's identity
git config --global user.name "${COMMIT_USER_NAME}"
git config --global user.email "${COMMIT_USER_EMAIL}"
# Create new orphan branch without parent history
git checkout --orphan ${pages_branch}
Expand Down

0 comments on commit 4f78675

Please sign in to comment.