Merge pull request #263 from wpengine/previews-wp-admin-docs #128
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Code Quality | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'plugins/**.php' | |
| pull_request: | |
| paths: | |
| - 'plugins/**.php' | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| name: Check code quality | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get changed plugin directory | |
| id: plugin | |
| run: | | |
| git fetch --prune --unshallow | |
| plugin=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep '^plugins/' | head -1 | cut -d/ -f2) | |
| echo "slug=$plugin" >> $GITHUB_OUTPUT | |
| - name: PHP Code Quality | |
| uses: ./.github/actions/code-quality | |
| with: | |
| working-directory: plugins/${{ steps.plugin.outputs.slug }} |