@@ -147,17 +147,23 @@ jobs:
147
147
runs-on : " ubuntu-latest"
148
148
timeout-minutes : 60
149
149
steps :
150
- - name : " Configure GPG signing key"
151
- run : echo "$GPG_SIGNING_KEY" | base64 --decode | gpg --import --no-tty --batch --yes
152
- env :
153
- GPG_SIGNING_KEY : ${{ secrets.GPG_SIGNING_KEY }}
150
+ -
151
+ name : Import GPG key
152
+ id : import-gpg
153
+ uses : crazy-max/ghaction-import-gpg@v5
154
+ with :
155
+ gpg_private_key : ${{ secrets.GPG_PHPSTANBOT_PRIVATE_KEY }}
156
+ passphrase : ${{ secrets.GPG_PHPSTANBOT_KEY_PASSPHRASE }}
157
+ git_config_global : true
158
+ git_user_signingkey : true
159
+ git_commit_gpgsign : true
154
160
155
161
- name : " Checkout phpstan-dist"
156
162
uses : actions/checkout@v3
157
163
with :
158
164
repository : phpstan/phpstan
159
165
path : phpstan-dist
160
- token : ${{ secrets.PAT }}
166
+ token : ${{ secrets.PHPSTAN_BOT_TOKEN }}
161
167
ref : 1.10.x
162
168
163
169
- name : " Get previous pushed dist commit"
@@ -215,18 +221,12 @@ jobs:
215
221
working-directory : phpstan-dist
216
222
run : rm phpstan.phar.asc && gpg --command-fd 0 --pinentry-mode loopback -u "$GPG_ID" --batch --detach-sign --armor --output phpstan.phar.asc phpstan.phar
217
223
env :
218
- GPG_ID : ${{ secrets.GPG_ID }}
224
+ GPG_ID : ${{ steps.import-gpg.outputs.fingerprint }}
219
225
220
226
- name : " Verify PHAR"
221
227
working-directory : phpstan-dist
222
228
run : " gpg --verify phpstan.phar.asc"
223
229
224
- - name : " Set Git signing key"
225
- working-directory : phpstan-dist
226
- run : git config user.signingkey "$GPG_ID"
227
- env :
228
- GPG_ID : ${{ secrets.GPG_ID }}
229
-
230
230
- name : " Install lucky_commit"
231
231
uses : baptiste0928/cargo-install@v1
232
232
with :
@@ -239,20 +239,20 @@ jobs:
239
239
env :
240
240
INPUT_LOG : ${{ steps.git-log.outputs.log }}
241
241
run : |
242
- git config --global user.name "Ondrej Mirtes "
243
- git config --global user.email "[email protected] "
242
+ git config --global user.name "phpstan-bot "
243
+ git config --global user.email "ondrej+phpstanbot @mirtes.cz"
244
244
git add .
245
- git commit --gpg-sign -m "Updated PHPStan to commit ${{ github.event.after }}" -m "$INPUT_LOG" --author "Ondrej Mirtes <[email protected] >"
245
+ git commit --gpg-sign -m "Updated PHPStan to commit ${{ github.event.after }}" -m "$INPUT_LOG" --author "phpstan-bot <ondrej+phpstanbot @mirtes.cz>"
246
246
lucky_commit ${{ steps.short-src-sha.outputs.sha }}
247
247
git push
248
248
249
249
- name : " Commit PHAR - tag"
250
250
if : " startsWith(github.ref, 'refs/tags/')"
251
251
uses : stefanzweifel/git-auto-commit-action@v4
252
252
with :
253
- commit_user_name : " Ondrej Mirtes "
254
- commit_user_email :
" [email protected] "
255
- commit_author :
" Ondrej Mirtes <[email protected] >"
253
+ commit_user_name : " phpstan-bot "
254
+ commit_user_email : " ondrej+phpstanbot @mirtes.cz"
255
+ commit_author : " phpstan-bot <ondrej+phpstanbot @mirtes.cz>"
256
256
commit_options : " --gpg-sign"
257
257
repository : phpstan-dist
258
258
commit_message : " PHPStan ${{github.ref_name}}"
0 commit comments