Skip to content

Commit d000bab

Browse files
berfinyukselberfinyuksel
andauthored
Migrate to reusable PHP-CS-Fixer workflow (#369)
* Migrate to reusable PHP-CS-Fixer workflow (reset from default) * Fix permissions for reusable PHP-CS-Fixer workflow * Update new PHP-CS-Fixer workflow --------- Co-authored-by: berfinyuksel <berfin.yuksel@gmail.com>
1 parent d00c6f0 commit d000bab

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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: write
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+
secrets:
26+
PHP_CS_FIXER_GITHUB_TOKEN: ${{ secrets.PHP_CS_FIXER_GITHUB_TOKEN }}
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@v2
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@v4
34+
with:
35+
commit_message: Apply php-cs-fixer changes

0 commit comments

Comments
 (0)