Skip to content

Commit ae3fe26

Browse files
authored
Add commit signing to cherry-pick workflow (#883)
1 parent 055c49b commit ae3fe26

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.github/workflows/automatic-cherry-pick.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,18 @@ jobs:
184184
# We need the history of all branches
185185
fetch-depth: 0
186186

187+
- name: Import Commit-Signing Key
188+
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0
189+
with:
190+
gpg_private_key: ${{ secrets.GH_ACTIONS_BOT_GPG_PRIVATE_KEY }}
191+
passphrase: ${{ secrets.GH_ACTIONS_BOT_GPG_PASSPHRASE }}
192+
git_config_global: true
193+
git_committer_name: ${{ vars.GH_ACTIONS_BOT_GIT_USER_NAME }}
194+
git_committer_email: ${{ vars.GH_ACTIONS_BOT_GIT_USER_EMAIL }}
195+
git_user_signingkey: true
196+
git_commit_gpgsign: true
197+
git_tag_gpgsign: true
198+
187199
- name: Determine branch information
188200
id: info
189201
run: |
@@ -194,10 +206,6 @@ jobs:
194206
id: cherry-pick
195207
continue-on-error: true
196208
run: |
197-
# We use the github-actions bot account for creating the commits. Note that this will not work if the repository requires signed commits.
198-
git config user.name "github-actions[bot]"
199-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
200-
201209
git checkout -b ${{ steps.info.outputs.new_branch }} origin/${{ matrix.branch }}
202210
git cherry-pick ${{ needs.process_comment.outputs.commits }}
203211

0 commit comments

Comments
 (0)