1name: "Auto-Fix code" 2on: 3 push: 4 branches: 5 - autofix 6 7jobs: 8 autofix: 9 runs-on: ubuntu-latest 10 steps: 11 - name: Checkout 12 uses: actions/checkout@v3 13 with: 14 fetch-depth: 0 15 16 - name: Setup PHP 17 uses: shivammathur/setup-php@v2 18 with: 19 php-version: '8.2' 20 tools: phpcbf, rector 21 22 - name: Setup Cache 23 uses: actions/cache@v3 24 with: 25 path: _test/.rector-cache 26 key: ${{ runner.os }}-rector-${{ hashFiles('_test/rector.php') }} 27 28 - name: Run Rector 29 run: rector process --config _test/rector.php --no-diffs 30 31 - name: Run PHP CodeSniffer autofixing 32 run: phpcbf --standard=_test/phpcs_MigrationAdjustments.xml 33 34 - name: Create Pull Request 35 uses: peter-evans/create-pull-request@v4 36 with: 37 commit-message: "Rector and PHPCS fixes" 38 title: "Rector and PHPCS fixes" 39 body: "These changes were made automatically by running rector and phpcbf. Note this is currently WIP and should not be merged!" 40 delete-branch: true 41 branch: "bot/autofix" 42