@@ -124,73 +124,6 @@ jobs:
124124 run : .phive/composer-normalize --ansi --dry-run
125125
126126 coding-standards :
127- timeout-minutes : 4
128- runs-on : ${{ matrix.os }}
129- concurrency :
130- cancel-in-progress : true
131- group : coding-standards-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
132- strategy :
133- matrix :
134- os :
135- - ubuntu-latest
136- php-version :
137- - ' 8.1'
138- dependencies :
139- - locked
140127 permissions :
141128 contents : write
142- steps :
143- - name : ⚙️ Set git to use LF line endings
144- run : |
145- git config --global core.autocrlf false
146- git config --global core.eol lf
147-
148- - name : 🛠️ Setup PHP
149- uses : shivammathur/setup-php@2.30.4
150- with :
151- php-version : ${{ matrix.php-version }}
152- extensions : none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, sockets
153- ini-values : error_reporting=E_ALL
154- coverage : none
155-
156- - name : 📦 Check out the codebase
157- uses : actions/checkout@v4.1.6
158-
159- - name : 🛠️ Setup problem matchers
160- run : |
161- echo "::add-matcher::${{ runner.tool_cache }}/php.json"
162-
163- - name : 🤖 Validate composer.json and composer.lock
164- run : composer validate --ansi --strict
165-
166- - name : 🔍 Get composer cache directory
167- uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
168-
169- - name : ♻️ Restore cached dependencies installed with composer
170- uses : actions/cache@v4.0.2
171- with :
172- path : ${{ env.COMPOSER_CACHE_DIR }}
173- key : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
174- restore-keys : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
175-
176- - name : 📥 Install "${{ matrix.dependencies }}" dependencies with composer
177- uses : wayofdev/gh-actions/actions/composer/install@v3.1.0
178- with :
179- dependencies : ${{ matrix.dependencies }}
180-
181- - name : 🛠️ Prepare environment
182- run : make prepare
183-
184- - name : 🚨 Run coding standards task
185- run : composer cs:fix
186- env :
187- PHP_CS_FIXER_IGNORE_ENV : true
188-
189- - name : 📤 Commit and push changed files back to GitHub
190- uses : stefanzweifel/git-auto-commit-action@v5.0.1
191- with :
192- commit_message : ' style(php-cs-fixer): lint php files and fix coding standards'
193- branch : ${{ github.head_ref }}
194- commit_author : ' github-actions <github-actions@users.noreply.github.com>'
195- env :
196- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
129+ uses : spiral/gh-actions/.github/workflows/cs-fix.yml@master
0 commit comments