Skip to content

Commit 2bda2b9

Browse files
committed
feat(workflow): add GPG key import and CI bot setup for automated PR creation
1 parent b19798b commit 2bda2b9

7 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/reusable-update-npm.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ name: Reusable NPM Update
88

99
permissions:
1010
contents: write
11+
issues: write
1112
pull-requests: write
1213

1314
on:
@@ -84,12 +85,30 @@ jobs:
8485
run: |
8586
find "$TARGET_DIR" -name 'index.html' -exec rm -f {} + 2>/dev/null || true
8687
88+
- name: Import GPG key
89+
if: steps.changes.outputs.has_changes == 'true'
90+
uses: crazy-max/ghaction-import-gpg@v7
91+
with:
92+
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
93+
passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }}
94+
git_config_global: true
95+
git_user_signingkey: true
96+
git_commit_gpgsign: true
97+
98+
- name: Setup CI Bot
99+
if: steps.changes.outputs.has_changes == 'true'
100+
run: |
101+
git config --global user.name "${{ secrets.BOT_USERNAME }}"
102+
git config --global user.email "${{ secrets.BOT_USEREMAIL }}"
103+
87104
- name: Create Pull Request
88105
if: steps.changes.outputs.has_changes == 'true'
89106
uses: peter-evans/create-pull-request@v7
90107
with:
91-
token: ${{ secrets.GITHUB_TOKEN }}
108+
token: ${{ secrets.BOT_TOKEN }}
92109
commit-message: 'chore: update ${{ inputs.npm_package }} to ${{ steps.fetch.outputs.version }}'
110+
author: '${{ secrets.BOT_USERNAME }} <${{ secrets.BOT_USEREMAIL }}>'
111+
committer: '${{ secrets.BOT_USERNAME }} <${{ secrets.BOT_USEREMAIL }}>'
93112
branch: ${{ inputs.branch_name }}
94113
delete-branch: true
95114
title: 'chore: update `${{ inputs.npm_package }}` to ${{ steps.fetch.outputs.version }}'

.github/workflows/update-docxjs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
issues: write
1011
pull-requests: write
1112

1213
jobs:

.github/workflows/update-exceljs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
issues: write
1011
pull-requests: write
1112

1213
jobs:

.github/workflows/update-jszip.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
issues: write
1011
pull-requests: write
1112

1213
jobs:

.github/workflows/update-libass-wasm.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
issues: write
1011
pull-requests: write
1112

1213
jobs:

.github/workflows/update-libheif.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
issues: write
1011
pull-requests: write
1112

1213
jobs:

.github/workflows/update-ruffle.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
permissions:
99
contents: write
10+
issues: write
1011
pull-requests: write
1112

1213
jobs:

0 commit comments

Comments
 (0)