From 1c2aed1e92bf47e5ee8db1b783333827f37f0e37 Mon Sep 17 00:00:00 2001 From: Sebastian Blank Date: Wed, 12 Jun 2024 08:21:11 +0200 Subject: [PATCH] PhpCsFixer: Execute on pull requests (#860) --- .github/workflows/php-cs-fixer.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/php-cs-fixer.yaml b/.github/workflows/php-cs-fixer.yaml index 769f1fe3..6d19d4f9 100644 --- a/.github/workflows/php-cs-fixer.yaml +++ b/.github/workflows/php-cs-fixer.yaml @@ -1,27 +1,35 @@ name: "PHP-CS-Fixer" on: + pull_request_target: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "feature-*" push: branches: - "[0-9]+.[0-9]+" - "[0-9]+.x" + - "*_actions" + - "feature-*" permissions: - contents: read + contents: read jobs: php-cs-fixer: permissions: - contents: write # for stefanzweifel/git-auto-commit-action to push code in repo + contents: write # for stefanzweifel/git-auto-commit-action to push code in repo runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: - ref: ${{ github.head_ref }} + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{ github.event.pull_request.head.repo.full_name }} - name: PHP-CS-Fixer uses: docker://oskarstark/php-cs-fixer-ga:latest - - uses: stefanzweifel/git-auto-commit-action@v4 + - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Apply php-cs-fixer changes