From 837de79c1ae5c429b5ae838aa75eb98953a4c789 Mon Sep 17 00:00:00 2001 From: Thomas Skerbis Date: Fri, 14 Feb 2025 21:23:49 +0100 Subject: [PATCH] Create cs-fix-manual.yml --- .github/workflows/cs-fix-manual.yml | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/cs-fix-manual.yml diff --git a/.github/workflows/cs-fix-manual.yml b/.github/workflows/cs-fix-manual.yml new file mode 100644 index 0000000..1b5c51c --- /dev/null +++ b/.github/workflows/cs-fix-manual.yml @@ -0,0 +1,45 @@ +name: PHP-CS-Fixer + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + workflow_dispatch: # Ermöglicht die manuelle Ausführung + +permissions: + contents: read + +jobs: + code-style: + + runs-on: ubuntu-latest + permissions: + contents: write # for Git to git apply + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref || github.ref_name }} + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: gd, intl, pdo_mysql + coverage: none # disable xdebug, pcov + + # install dependencies from composer.json + - name: Install test dependencies + env: + COMPOSER: composer.json + run: composer install --prefer-dist --no-progress + + # run php-cs-fixer, fix code styles + - name: Run PHP CS Fixer + run: composer cs-fix + + # commit and push fixed files + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply php-cs-fixer changes