mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
69 lines
1.9 KiB
YAML
69 lines
1.9 KiB
YAML
name: Pint Code Style Fixer
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
pint-fixer:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.3'
|
|
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
|
|
coverage: none
|
|
|
|
- name: Configure Laravel Nova Authentication
|
|
shell: bash
|
|
env:
|
|
NOVA_USERNAME: ${{ secrets.NOVA_USERNAME }}
|
|
NOVA_LICENSE_KEY: ${{ secrets.NOVA_LICENSE_KEY }}
|
|
run: |
|
|
composer config http-basic.nova.laravel.com "$NOVA_USERNAME" "$NOVA_LICENSE_KEY"
|
|
|
|
- name: Get Composer Cache Directory
|
|
id: composer-cache
|
|
run: |
|
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/cache@v4
|
|
id: actions-cache
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-composer-
|
|
|
|
- name: Cache PHP dependencies
|
|
uses: actions/cache@v4
|
|
id: vendor-cache
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
|
|
|
|
- name: Install Dependencies
|
|
if: steps.vendor-cache.outputs.cache-hit != 'true'
|
|
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
|
|
|
- name: Update Dependencies with latest stable
|
|
run: composer update --prefer-stable
|
|
|
|
- name: Run Laravel Pint
|
|
uses: aglipanci/laravel-pint-action@2
|
|
with:
|
|
preset: laravel
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
with:
|
|
commit_message: Apply pint code style changes
|