-
Notifications
You must be signed in to change notification settings - Fork 506
50 lines (48 loc) · 1.67 KB
/
update-phpstorm-stubs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Update PhpStorm stubs"
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * 2'
jobs:
update-phpstorm-stubs:
name: "Update PhpStorm stubs"
if: ${{ github.repository == 'phpstan/phpstan-src' }}
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
ref: 2.1.x
fetch-depth: '0'
token: ${{ secrets.PHPSTAN_BOT_TOKEN }}
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.1"
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress"
- name: "Checkout stubs"
uses: actions/checkout@v4
with:
path: "phpstorm-stubs"
repository: "jetbrains/phpstorm-stubs"
- name: "Update stubs"
run: "composer require jetbrains/phpstorm-stubs:dev-master#$(git -C phpstorm-stubs rev-parse HEAD)"
- name: "Remove stubs repo"
run: "rm -r phpstorm-stubs"
- name: "Update function metadata"
run: "./bin/generate-function-metadata.php"
- name: "Create Pull Request"
id: create-pr
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PHPSTAN_BOT_TOKEN }}
branch-suffix: random
delete-branch: true
title: "Update PhpStorm stubs"
body: "Update PhpStorm stubs"
committer: "phpstan-bot <[email protected]>"
commit-message: "Update PhpStorm stubs"