diff --git a/.github/workflows/new-php-cs-fixer.yaml b/.github/workflows/new-php-cs-fixer.yaml new file mode 100644 index 00000000..ab147768 --- /dev/null +++ b/.github/workflows/new-php-cs-fixer.yaml @@ -0,0 +1,26 @@ +name: "PHP-CS-Fixer" + +on: + pull_request: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "feature-*" + push: + branches: + - "[0-9]+.[0-9]+" + - "[0-9]+.x" + - "*_actions" + - "feature-*" + +permissions: + contents: write + +jobs: + php-cs-fixer: + uses: pimcore/workflows-collection-public/.github/workflows/reusable-php-cs-fixer.yaml@main + with: + head_ref: ${{ github.head_ref || github.ref_name }} + repository: ${{ github.repository }} + secrets: + PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }} diff --git a/.github/workflows/php-cs-fixer.yaml.bak b/.github/workflows/php-cs-fixer.yaml.bak new file mode 100644 index 00000000..6d19d4f9 --- /dev/null +++ b/.github/workflows/php-cs-fixer.yaml.bak @@ -0,0 +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 + +jobs: + php-cs-fixer: + permissions: + contents: write # for stefanzweifel/git-auto-commit-action to push code in repo + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + 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@v5 + with: + commit_message: Apply php-cs-fixer changes