@@ -182,37 +182,27 @@ jobs:
182182 - name : Import GPG key
183183 id : gpg
184184 env :
185- GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
185+ GPG_PRIVATE_KEY : ${{ secrets.BOT_GPG_PRIVATE_KEY }}
186186 run : |
187187 echo "$GPG_PRIVATE_KEY" | gpg --batch --import
188188 KEY_ID=$(gpg --list-secret-keys --keyid-format=long --with-colons \
189189 | awk -F: '/^sec/ {print $5; exit}')
190- UID_LINE=$(gpg --list-secret-keys --with-colons \
191- | awk -F: '/^uid/ {print $10; exit}')
192- USER_NAME=$(echo "$UID_LINE" | sed -E 's/ *<[^>]+>$//')
193- USER_EMAIL=$(echo "$UID_LINE" | sed -E 's/.*<([^>]+)>.*/\1/')
194- if [ -z "$KEY_ID" ] || [ -z "$USER_EMAIL" ]; then
195- echo "Failed to determine GPG key id / uid (key_id=${KEY_ID}, uid=${UID_LINE})"
190+ if [ -z "$KEY_ID" ]; then
191+ echo "Failed to determine GPG key id"
196192 exit 1
197193 fi
198194 mkdir -p ~/.gnupg
199195 echo "default-key ${KEY_ID}" >> ~/.gnupg/gpg.conf
200196 echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
201- {
202- echo "key_id=${KEY_ID}"
203- echo "user_name=${USER_NAME}"
204- echo "user_email=${USER_EMAIL}"
205- } >> "$GITHUB_OUTPUT"
197+ echo "key_id=${KEY_ID}" >> "$GITHUB_OUTPUT"
206198
207199 - name : Configure git
208200 env :
209201 KEY_ID : ${{ steps.gpg.outputs.key_id }}
210- USER_NAME : ${{ steps.gpg.outputs.user_name }}
211- USER_EMAIL : ${{ steps.gpg.outputs.user_email }}
212202 run : |
213203 cd compilation
214- git config user.name "${USER_NAME} "
215- git config user.email "${USER_EMAIL} "
204+ git config user.name "Datasqrl - Automation Bot "
205+ git config user.email "bot@datasqrl.com "
216206 git config user.signingkey "${KEY_ID}"
217207 git config commit.gpgsign true
218208
@@ -449,37 +439,27 @@ jobs:
449439 id : gpg
450440 if : steps.branch_exists.outputs.exists == 'true'
451441 env :
452- GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
442+ GPG_PRIVATE_KEY : ${{ secrets.BOT_GPG_PRIVATE_KEY }}
453443 run : |
454444 echo "$GPG_PRIVATE_KEY" | gpg --batch --import
455445 KEY_ID=$(gpg --list-secret-keys --keyid-format=long --with-colons \
456446 | awk -F: '/^sec/ {print $5; exit}')
457- UID_LINE=$(gpg --list-secret-keys --with-colons \
458- | awk -F: '/^uid/ {print $10; exit}')
459- USER_NAME=$(echo "$UID_LINE" | sed -E 's/ *<[^>]+>$//')
460- USER_EMAIL=$(echo "$UID_LINE" | sed -E 's/.*<([^>]+)>.*/\1/')
461- if [ -z "$KEY_ID" ] || [ -z "$USER_EMAIL" ]; then
462- echo "Failed to determine GPG key id / uid (key_id=${KEY_ID}, uid=${UID_LINE})"
447+ if [ -z "$KEY_ID" ]; then
448+ echo "Failed to determine GPG key id"
463449 exit 1
464450 fi
465451 mkdir -p ~/.gnupg
466452 echo "default-key ${KEY_ID}" >> ~/.gnupg/gpg.conf
467453 echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
468- {
469- echo "key_id=${KEY_ID}"
470- echo "user_name=${USER_NAME}"
471- echo "user_email=${USER_EMAIL}"
472- } >> "$GITHUB_OUTPUT"
454+ echo "key_id=${KEY_ID}" >> "$GITHUB_OUTPUT"
473455
474456 - name : Configure git
475457 if : steps.branch_exists.outputs.exists == 'true'
476458 env :
477459 KEY_ID : ${{ steps.gpg.outputs.key_id }}
478- USER_NAME : ${{ steps.gpg.outputs.user_name }}
479- USER_EMAIL : ${{ steps.gpg.outputs.user_email }}
480460 run : |
481- git config user.name "${USER_NAME} "
482- git config user.email "${USER_EMAIL} "
461+ git config user.name "Datasqrl - Automation Bot "
462+ git config user.email "bot@datasqrl.com "
483463 git config user.signingkey "${KEY_ID}"
484464 git config commit.gpgsign true
485465
0 commit comments