Skip to content

Commit

Permalink
Merge pull request #77 from zregvart/pr/ec-automation-instead-of-actor
Browse files Browse the repository at this point in the history
Use ec-automation account and sign the commit
  • Loading branch information
lcarva authored Mar 28, 2024
2 parents c101d24 + a0dd031 commit b842fb5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hack/create-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@ PR_REMOTE="${3-origin}"
cd "${LOCAL}" || exit 1

# Setup key for access in the GH workflow
if [ -n "${GITHUB_ACTIONS:-}" ]; then
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
if [ -n "${APP_INSTALL_ID:-}" ]; then
git config --global user.email "${APP_INSTALL_ID}-ec-automation[bot]@users.noreply.github.com"
git config --global user.name "ec-automation[bot]"
git config --global commit.gpgsign true
git config --global gpg.format ssh
mkdir -p "${HOME}/.ssh"
echo "${DEPLOY_KEY}" > "${HOME}/.ssh/id_ed25519"
chmod 600 "${HOME}/.ssh/id_ed25519"
git config --global user.signingkey "$(ssh-add -L)"
trap 'rm -rf "${HOME}/.ssh/id_rsa"' EXIT
export GITHUB_USER="$GITHUB_ACTOR"
fi
Expand Down

0 comments on commit b842fb5

Please sign in to comment.