|
| 1 | +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions |
| 2 | + |
| 3 | +name: "Send pull request" |
| 4 | + |
| 5 | +on: |
| 6 | + release: |
| 7 | + types: [published] |
| 8 | + |
| 9 | +jobs: |
| 10 | + send-pr: |
| 11 | + name: "Send pull request" |
| 12 | + runs-on: "ubuntu-latest" |
| 13 | + steps: |
| 14 | + - name: "Install PHP" |
| 15 | + uses: "shivammathur/setup-php@v2" |
| 16 | + with: |
| 17 | + coverage: "none" |
| 18 | + php-version: "8.1" |
| 19 | + |
| 20 | + - name: "Checkout phpstan-src" |
| 21 | + uses: actions/checkout@v3 |
| 22 | + with: |
| 23 | + repository: phpstan/phpstan-src |
| 24 | + path: phpstan-src |
| 25 | + token: ${{ secrets.PHPSTAN_BOT_TOKEN }} |
| 26 | + |
| 27 | + - name: "Install dependencies" |
| 28 | + working-directory: ./phpstan-src |
| 29 | + run: "composer install --no-interaction --no-progress --no-suggest" |
| 30 | + |
| 31 | + - name: "Change composer.json" |
| 32 | + working-directory: ./phpstan-src |
| 33 | + run: "composer require phpstan/phpdoc-parser:${{ github.ref }}" |
| 34 | + |
| 35 | + - name: "Create Pull Request" |
| 36 | + id: create-pr |
| 37 | + uses: peter-evans/create-pull-request@v4 |
| 38 | + with: |
| 39 | + token: ${{ secrets.PHPSTAN_BOT_TOKEN }} |
| 40 | + path: ./phpstan-src |
| 41 | + branch-suffix: random |
| 42 | + delete-branch: true |
| 43 | + title: "Update phpdoc-parser" |
| 44 | + body: "Update phpstan/phpdoc-parser to ${{ github.ref }}" |
| 45 | + committer: "phpstan-bot <ondrej+phpstanbot@mirtes.cz>" |
| 46 | + commit-message: "Update phpdoc-parser" |
0 commit comments