Skip to content

chore: release 1.x (#308) #1452

chore: release 1.x (#308)

chore: release 1.x (#308) #1452

Workflow file for this run

name: Fix Code Style
on:
push:
paths:
- 'core/**'
- 'plugin/**'
- 'bridge/**'
- 'tests/**'
- 'testo.php'
- '.php-cs-fixer.dist.php'
- 'tools/code-style/composer.json'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/cs-fix.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
cs-fix:
runs-on: ubuntu-latest
permissions:
contents: write
name: PHP-CS-Fixer
steps:
# php-cs-fixer rewrites files; keep LF so it never churns line endings.
- name: Configure Git line endings
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout
uses: actions/checkout@v7
# The split sub-packages pin testo/testo; in CI the root is a detached
# commit (dev-<sha>), so its version must be declared explicitly.
- name: Resolve root package version
run: echo "COMPOSER_ROOT_VERSION=$(jq -r '.["."]' resources/version.json)" >> "$GITHUB_ENV"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
# PHP-CS-Fixer (spiral/code-style) is isolated via bamarni/composer-bin-plugin.
- name: Install isolated code-style
run: composer bin code-style install
- name: Run PHP-CS-Fixer
run: composer cs:fix
- name: Commit and push fixes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'style(cs): apply php-cs-fixer'
commit_author: 'github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>'