Repository navigation
45 lines (41 loc) · 1.68 KB
/
Copy pathfix-php-code-style-issues.yml
File metadata and controls
45 lines (41 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: fix php code style issues
on:
push:
paths: ['**.php']
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
php-code-styling:
runs-on: ubuntu-latest
timeout-minutes: 10
# The bot's own style commit lands as another push. Without this guard the
# workflow would run a second time only to find nothing left to fix.
if: github.actor != 'github-actions[bot]'
steps:
# persist-credentials stays enabled here, unlike in every other workflow:
# this is the one job that has to push back to the branch.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
with:
php-version: '8.4'
extensions: mbstring, intl, pdo_mysql, redis, gd, exif, bcmath
coverage: none
- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: vendor
key: vendor-8.4-${{ hashFiles('composer.lock') }}
restore-keys: vendor-8.4-
- name: Composer install
run: composer install --no-interaction --prefer-dist --no-scripts
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
- run: vendor/bin/pint --parallel
# Commits made with GITHUB_TOKEN do not trigger workflows, so this style
# commit will not re-run tests or static analysis by itself.
- uses: stefanzweifel/git-auto-commit-action@d0b01107b5db882071f96de5dd4b54961ea93f4c # v7.2.1
with:
commit_message: 'style(lint): fix coding style issues'
commit_options: '--no-verify'