Skip to content

Commit d6069e0

Browse files
author
berfinyuksel
committed
Migrate to reusable PHP-CS-Fixer workflow
1 parent 3b853ec commit d6069e0

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "PHP-CS-Fixer"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "[0-9]+.[0-9]+"
7+
- "[0-9]+.x"
8+
- "feature-*"
9+
push:
10+
branches:
11+
- "[0-9]+.[0-9]+"
12+
- "[0-9]+.x"
13+
- "*_actions"
14+
- "feature-*"
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
php-cs-fixer:
21+
uses: pimcore/workflows-collection-public/.github/workflows/reusable-php-cs-fixer.yaml@main
22+
with:
23+
head_ref: ${{ github.head_ref || github.ref_name }}
24+
repository: ${{ github.repository }}
25+
26+
secrets:
27+
PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }}
28+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "PHP-CS-Fixer"
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- "[0-9]+.[0-9]+"
7+
- "[0-9]+.x"
8+
- "feature-*"
9+
push:
10+
branches:
11+
- "[0-9]+.[0-9]+"
12+
- "[0-9]+.x"
13+
- "*_actions"
14+
- "feature-*"
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
php-cs-fixer:
21+
permissions:
22+
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
ref: ${{ github.event.pull_request.head.ref }}
28+
repository: ${{ github.event.pull_request.head.repo.full_name }}
29+
30+
- name: PHP-CS-Fixer
31+
uses: docker://oskarstark/php-cs-fixer-ga:latest
32+
33+
- uses: stefanzweifel/git-auto-commit-action@v5
34+
with:
35+
commit_message: Apply php-cs-fixer changes

0 commit comments

Comments
 (0)