-
Notifications
You must be signed in to change notification settings - Fork 519
46 lines (38 loc) · 1.22 KB
/
normalize-composer.yml
File metadata and controls
46 lines (38 loc) · 1.22 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
46
name: Normalize Composer
on:
workflow_dispatch:
inputs:
php:
default: '8.4'
type: string
description: The PHP version to use
required: false
message:
default: Normalize composer.json files
type: string
description: The commit message to use
required: false
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php }}
extensions: curl, dom, json, libxml, mbstring
coverage: none
- name: Install Composer Normalizer
run: |
composer global config --no-plugins allow-plugins.ergebnis/composer-normalize true
composer global require ergebnis/composer-normalize
- name: Normalize the root composer.json file
run: composer normalize
- name: Normalize the packages composer.json files
run: find src -name "composer.json" -print -exec composer normalize {} \;
- name: Commit linted files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: ${{ inputs.message }}