Skip to content

Workflow file for this run

name: Fixer, Styling & Optimizer
on:
pull_request:
paths:
- "donjo-app/Views**"
permissions:
actions: write
contents: write
pull-requests: write
env:
COMMIT_USER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
COMMIT_USER_NAME: github-actions[bot]
jobs:
php-cs-fixer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo ${{ toJson(github) }}
- run: composer install
- run: composer run csfix
- run: |
git config --local user.email "$COMMIT_USER_EMAIL"
git config --local user.name "$COMMIT_USER_NAME"
git commit -a -m "Fixed & optimize by php-cs-fixer"
git push
format-view:
needs: [php-cs-fixer]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: npm ci
- run: |
git fetch
git pull
- id: changed-files-specific
uses: tj-actions/changed-files@v37
with:
files: donjo-app/Views/**
- if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
for i in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do
npm run format $i
done
- if: steps.changed-files-specific.outputs.any_changed == 'true'
run: |
git config --local user.email "$COMMIT_USER_EMAIL"
git config --local user.name "$COMMIT_USER_NAME"
git commit -a -m "Format view"
git push