Skip to content

Commit 9239c30

Browse files
committed
add commit signing on PR [no ci]
1 parent 069f689 commit 9239c30

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.github/workflows/pr.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ permissions: write-all
99
jobs:
1010
dependencies:
1111
uses: ./.github/workflows/shared-changesets-dependencies.yml
12+
with:
13+
gitUserEmail: [email protected]
14+
gitUserName: pinax-bot
1215
if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
1316
secrets:
14-
githubToken: ${{ secrets.GITHUB_TOKEN }}
17+
githubToken: ${{ secrets.PINAX_BOT_GITHUB_TOKEN }}
18+
pgpPrivateKey: ${{ secrets.PINAX_BOT_PGP_PRIVATE_KEY }}
19+
pgpPassphrase: ${{ secrets.PINAX_BOT_PGP_PASSPHRASE }}
1520

1621
alpha:
1722
uses: ./.github/workflows/shared-release-snapshot.yml

.github/workflows/shared-changesets-dependencies.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,21 @@ on:
2323
required: false
2424
type: string
2525
default: '20'
26+
gitUserEmail:
27+
required: false
28+
type: string
29+
default: ''
30+
gitUserName:
31+
required: false
32+
type: string
33+
default: ''
2634
secrets:
2735
githubToken:
2836
required: true
37+
pgpPrivateKey:
38+
required: true
39+
pgpPassphrase:
40+
required: true
2941

3042
jobs:
3143
changeset:
@@ -38,6 +50,16 @@ jobs:
3850
fetch-depth: 0
3951
token: ${{ secrets.githubToken }}
4052

53+
- name: Import bot's GPG key for signing commits
54+
id: import-gpg
55+
uses: crazy-max/ghaction-import-gpg@v4
56+
with:
57+
gpg_private_key: ${{ secrets.pgpPrivateKey }}
58+
passphrase: ${{ secrets.pgpPassphrase }}
59+
git_config_global: true
60+
git_user_signingkey: true
61+
git_commit_gpgsign: true
62+
4163
- uses: ./.github/actions/setup-node
4264
name: setup env and install dependencies
4365
if: ${{ inputs.installDependencies }}
@@ -47,8 +69,10 @@ jobs:
4769
packageManagerVersion: ${{ inputs.packageManagerVersion }}
4870

4971
- name: Create/Update Changesets
50-
uses: pinax-network/changesets-dependencies-action@v1.2.2
72+
uses: pinax-network/changesets-dependencies-action@v1.3.0
5173
with:
5274
preCommit: ${{ inputs.preCommit }}
75+
gitUserEmail: ${{ inputs.gitUserEmail }}
76+
gitUserName: ${{ inputs.gitUserName }}
5377
env:
5478
GITHUB_TOKEN: ${{ secrets.githubToken }}

0 commit comments

Comments
 (0)