From 0fa027e8b21e53e2829172ecf41acb0964539725 Mon Sep 17 00:00:00 2001 From: Sebastian Blank Date: Mon, 29 Apr 2024 14:46:17 +0200 Subject: [PATCH] PhpCsFixer: Fix pull requests from forks --- .github/workflows/php-cs-fixer.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/php-cs-fixer.yaml b/.github/workflows/php-cs-fixer.yaml index e1f17de..6d19d4f 100644 --- a/.github/workflows/php-cs-fixer.yaml +++ b/.github/workflows/php-cs-fixer.yaml @@ -1,7 +1,7 @@ name: "PHP-CS-Fixer" on: - pull_request: + pull_request_target: branches: - "[0-9]+.[0-9]+" - "[0-9]+.x" @@ -22,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 \ No newline at end of file + commit_message: Apply php-cs-fixer changes