Skip to content

Commit 282e6e8

Browse files
committed
Added GPG signing
1 parent 84ddf6d commit 282e6e8

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/sync-remove-json-keys.py-changes.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ jobs:
4545
echo "$COMMIT_MSG" | sed 's/`/\`/g' >> $GITHUB_ENV
4646
echo "EOF" >> $GITHUB_ENV
4747
48+
- name: Config committer
49+
run: |
50+
gpg --batch --import <(echo "${{ secrets.GPG_PRIVATE_KEY }}")
51+
git config --global user.name "kudo-sync-bot"
52+
git config --global user.email "[email protected]"
53+
git config --global user.signingkey "${{ secrets.GPG_PRIVATE_ID }}"
54+
4855
- name: Replace outdated files in target repos, push changes
4956
run: |
5057
target_repos=(${{ steps.list_repos.outputs.repos }})
@@ -65,8 +72,7 @@ jobs:
6572
fi
6673
done
6774
git diff-index --quiet HEAD || (echo "Committing changes" && \
68-
GIT_COMMITTER_NAME="kudo-sync-bot" GIT_COMMITTER_EMAIL="[email protected]" \
69-
git commit -m "$ESCAPED_MSG ↞ [auto-sync from \`adamlui/python-utils\`]")
75+
git commit -S -m "$ESCAPED_MSG ↞ [auto-sync from \`adamlui/python-utils\`]")
7076
git remote set-url --push origin "https://kudo-sync-bot:${{ secrets.REPO_SYNC_PAT }}@github.com/$repo"
7177
echo "Pushing changes"
7278
git push --force

.github/workflows/sync-translate-en-messages-changes.py.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ jobs:
4545
echo "$COMMIT_MSG" | sed 's/`/\`/g' >> $GITHUB_ENV
4646
echo "EOF" >> $GITHUB_ENV
4747
48+
- name: Config committer
49+
run: |
50+
gpg --batch --import <(echo "${{ secrets.GPG_PRIVATE_KEY }}")
51+
git config --global user.name "kudo-sync-bot"
52+
git config --global user.email "[email protected]"
53+
git config --global user.signingkey "${{ secrets.GPG_PRIVATE_ID }}"
54+
4855
- name: Replace outdated files in target repos, push changes
4956
run: |
5057
target_repos=(${{ steps.list_repos.outputs.repos }})
@@ -65,8 +72,7 @@ jobs:
6572
fi
6673
done
6774
git diff-index --quiet HEAD || (echo "Committing changes" && \
68-
GIT_COMMITTER_NAME="kudo-sync-bot" GIT_COMMITTER_EMAIL="[email protected]" \
69-
git commit -m "$ESCAPED_MSG ↞ [auto-sync from \`adamlui/python-utils\`]")
75+
git commit -S -m "$ESCAPED_MSG ↞ [auto-sync from \`adamlui/python-utils\`]")
7076
git remote set-url --push origin "https://kudo-sync-bot:${{ secrets.REPO_SYNC_PAT }}@github.com/$repo"
7177
echo "Pushing changes"
7278
git push --force

0 commit comments

Comments
 (0)