Set-up php-cs-fixer using setup-php in codestyle workflow
authorTim Düsterhus <tim@bastelstu.be>
Mon, 19 Apr 2021 12:50:45 +0000 (14:50 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 19 Apr 2021 12:55:15 +0000 (14:55 +0200)
This allows us to easily install extensions.

.github/workflows/codestyle.yml

index 5ae031c2b3df11c447a8f0ed91666e56d5794d2a..5da0df3ff80775de466b162b625792d240680c78 100644 (file)
@@ -16,7 +16,11 @@ jobs:
     - uses: actions/checkout@v2
     - name: phpcs
       uses: chekalsky/phpcs-action@e269c2f264f400adcda7c6b24c8550302350d495
-    - name: php-cs-fixer
-      uses: docker://oskarstark/php-cs-fixer-ga
+    - name: Setup PHP with tools
+      uses: shivammathur/setup-php@v2
       with:
-        args: --dry-run --diff-format udiff
+        php-version: '7.4'
+        extensions: ctype, dom, exif, gd, gmp, hash, intl, json, libxml, mbstring, opcache, pcre, pdo, pdo_mysql, zlib
+        tools: php-cs-fixer
+    - name: php-cs-fixer
+      run: php-cs-fixer fix --dry-run --diff-format udiff