1- # This does the following:
2- # 1. Detects modified plugins in the plugins/ directory
3- # 2. Runs WordPress Plugin Check using the official action
4- # 3. Creates a matrix job for each changed plugin
5- # 4. Results appear as file annotations directly in PRs
6- # Bonus: This means you can have plugin specific badges e.g.
7- # [](https://github.com/wpengine/hwptoolkit/actions)
1+ # Runs WordPress Plugin Check on modified plugins to ensure compliance with
2+ # WordPress.org guidelines and coding standards.
3+ #
4+ # https://wordpress.org/plugins/plugin-check/
85
9- name : WordPress Plugin Check
6+ name : Plugin Check
107
118on :
129 push :
2320jobs :
2421 detect-plugins :
2522 runs-on : ubuntu-latest
26- name : Detect plugins for Plugin Check
23+ name : Detect modified plugins
2724 outputs :
2825 plugins : ${{ steps.detect.outputs.plugins }}
2926 has-plugins : ${{ steps.detect.outputs.has-plugins }}
@@ -42,11 +39,10 @@ jobs:
4239 ${{ github.event.pull_request.head.sha }}
4340 fi
4441
45- - name : Detect plugins
42+ - name : Set output
4643 id : detect
4744 run : |
4845 if [ -z "${{ steps.plugin.outputs.plugins }}" ] || [ "${{ steps.plugin.outputs.plugins }}" = "[]" ]; then
49- echo "No plugins detected"
5046 echo "plugins=[]" >> $GITHUB_OUTPUT
5147 echo "has-plugins=false" >> $GITHUB_OUTPUT
5248 exit 0
6258 matrix :
6359 plugin : ${{ fromJson(needs.detect-plugins.outputs.plugins) }}
6460 fail-fast : false
65- name : ${{ matrix.plugin }} Plugin Check
61+ name : ${{ matrix.plugin }}
6662 steps :
6763 - name : Checkout
6864 uses : actions/checkout@v4
0 commit comments