From 4477a3c341d53d9baedf9dcf8844e1966819c2de Mon Sep 17 00:00:00 2001 From: Sebastian Blank Date: Mon, 29 Apr 2024 14:19:04 +0200 Subject: [PATCH] PhpCsFixer: Execute on pull requests --- .github/workflows/php-cs-fixer.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php-cs-fixer.yaml b/.github/workflows/php-cs-fixer.yaml index 7fe1f05..6d19d4f 100644 --- a/.github/workflows/php-cs-fixer.yaml +++ b/.github/workflows/php-cs-fixer.yaml @@ -1,11 +1,17 @@ - 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 @@ -16,13 +22,14 @@ jobs: 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