Merge pull request #441 from 10up/fix/429-update-cypress-utils #60
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: Plugin Check | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - trunk | |
| pull_request: | |
| branches: | |
| - develop | |
| # Disable permissions for all available scopes by default. | |
| # Any needed permissions should be configured at the job level. | |
| permissions: {} | |
| jobs: | |
| build: | |
| uses: 10up/restricted-site-access/.github/workflows/build-release-zip.yml@develop | |
| permissions: | |
| contents: read | |
| plugin-check: | |
| needs: build | |
| name: Run Plugin Check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Download build zip | |
| uses: actions/download-artifact@b14cf4c92620c250e1c074ab0a5800e37df86765 # v4.2.0 | |
| with: | |
| name: ${{ github.event.repository.name }} | |
| path: ${{ github.event.repository.name }}-artifact | |
| - name: Remove files from .distignore | |
| working-directory: ${{ github.event.repository.name }}-artifact | |
| run: | | |
| if [ -f .distignore ]; then | |
| while IFS= read -r line; do | |
| rm -rf "${line}" | |
| done < .distignore | |
| fi | |
| - name: Display structure of distributed files | |
| run: ls -R | |
| working-directory: ${{ github.event.repository.name }}-artifact | |
| - name: Run plugin check | |
| uses: wordpress/plugin-check-action@98a1788320d0add90df2d8183934ecccbc4e05d2 # v1.1.7 | |
| with: | |
| build-dir: ${{ github.event.repository.name }}-artifact | |
| exclude-directories: '.github,tests,phpcs.xml.dist' | |
| ignore-codes: 'hidden_files,unexpected_markdown_file,missing_composer_json_file,WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound,WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound' | |
| slug: restricted-site-access |