|
1 | 1 | name: Plugin Check |
2 | 2 |
|
3 | 3 | on: |
4 | | - workflow_dispatch: |
5 | | - push: |
6 | | - branches: |
7 | | - - develop |
8 | | - - trunk |
9 | | - pull_request: |
10 | | - types: |
11 | | - - opened |
12 | | - - synchronize |
13 | | - - ready_for_review |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - develop |
| 8 | + - trunk |
| 9 | + pull_request: |
| 10 | + types: |
| 11 | + - opened |
| 12 | + - synchronize |
| 13 | + - ready_for_review |
14 | 14 |
|
15 | 15 | # Cancels all previous workflow runs for pull requests that have not completed. |
16 | 16 | concurrency: |
17 | | - # The concurrency group contains the workflow name and the branch name for pull requests |
18 | | - # or the commit hash for any other events. |
19 | | - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} |
20 | | - cancel-in-progress: true |
| 17 | + # The concurrency group contains the workflow name and the branch name for pull requests |
| 18 | + # or the commit hash for any other events. |
| 19 | + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} |
| 20 | + cancel-in-progress: true |
21 | 21 |
|
22 | 22 | # Disable permissions for all available scopes by default. |
23 | 23 | # Any needed permissions should be configured at the job level. |
24 | 24 | permissions: {} |
25 | 25 |
|
26 | 26 | jobs: |
27 | | - prepare-matrix: |
28 | | - runs-on: ubuntu-latest |
29 | | - permissions: |
30 | | - contents: read |
31 | | - outputs: |
32 | | - plugins: ${{ steps.set-matrix.outputs.plugins }} |
33 | | - steps: |
34 | | - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 27 | + prepare-matrix: |
| 28 | + runs-on: ubuntu-latest |
| 29 | + permissions: |
| 30 | + contents: read |
| 31 | + outputs: |
| 32 | + plugins: ${{ steps.set-matrix.outputs.plugins }} |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
35 | 35 |
|
36 | | - - uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0 |
37 | | - with: |
38 | | - php-version: '8.3' |
| 36 | + - uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0 |
| 37 | + with: |
| 38 | + php-version: '8.3' |
39 | 39 |
|
40 | | - - name: Setup Node.js (.nvmrc) |
41 | | - uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 |
42 | | - with: |
43 | | - node-version-file: '.nvmrc' |
44 | | - cache: npm |
| 40 | + - name: Setup Node.js (.nvmrc) |
| 41 | + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 |
| 42 | + with: |
| 43 | + node-version-file: '.nvmrc' |
| 44 | + cache: npm |
45 | 45 |
|
46 | | - - name: npm install |
47 | | - run: npm ci |
| 46 | + - name: npm install |
| 47 | + run: npm ci |
48 | 48 |
|
49 | | - - name: Build plugins |
50 | | - run: npm run build-plugins |
| 49 | + - name: Build plugins |
| 50 | + run: npm run build-plugins |
51 | 51 |
|
52 | | - - name: Upload built plugins |
53 | | - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 |
54 | | - with: |
55 | | - name: built-plugins |
56 | | - path: build/ |
57 | | - retention-days: 1 |
| 52 | + - name: Upload built plugins |
| 53 | + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 |
| 54 | + with: |
| 55 | + name: built-plugins |
| 56 | + path: build/ |
| 57 | + retention-days: 1 |
58 | 58 |
|
59 | | - - name: Generate matrix |
60 | | - id: set-matrix |
61 | | - run: | |
62 | | - PLUGINS=$(jq -c '.plugins' plugins.json) |
63 | | - echo "plugins=$PLUGINS" >> $GITHUB_OUTPUT |
| 59 | + - name: Generate matrix |
| 60 | + id: set-matrix |
| 61 | + run: | |
| 62 | + PLUGINS=$(jq -c '.plugins' plugins.json) |
| 63 | + echo "plugins=$PLUGINS" >> $GITHUB_OUTPUT |
64 | 64 |
|
65 | | - plugin-check: |
66 | | - needs: prepare-matrix |
67 | | - name: Check ${{ matrix.plugin }} |
68 | | - runs-on: ubuntu-24.04 |
69 | | - permissions: |
70 | | - contents: read |
71 | | - timeout-minutes: 20 |
72 | | - strategy: |
73 | | - fail-fast: false |
74 | | - matrix: |
75 | | - plugin: ${{ fromJson(needs.prepare-matrix.outputs.plugins) }} |
76 | | - steps: |
77 | | - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 65 | + plugin-check: |
| 66 | + needs: prepare-matrix |
| 67 | + name: Check ${{ matrix.plugin }} |
| 68 | + runs-on: ubuntu-24.04 |
| 69 | + permissions: |
| 70 | + contents: read |
| 71 | + timeout-minutes: 20 |
| 72 | + strategy: |
| 73 | + fail-fast: false |
| 74 | + matrix: |
| 75 | + plugin: ${{ fromJson(needs.prepare-matrix.outputs.plugins) }} |
| 76 | + steps: |
| 77 | + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
78 | 78 |
|
79 | | - - name: Download built plugins |
80 | | - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 |
81 | | - with: |
82 | | - name: built-plugins |
83 | | - path: build |
| 79 | + - name: Download built plugins |
| 80 | + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 |
| 81 | + with: |
| 82 | + name: built-plugins |
| 83 | + path: build |
84 | 84 |
|
85 | | - - name: Run plugin check |
86 | | - uses: wordpress/plugin-check-action@27b60e89aad9f3006d5c800a8fa9bbaa87c36421 # main |
87 | | - with: |
88 | | - build-dir: ./build/${{ matrix.plugin }} |
89 | | - slug: ${{ matrix.plugin }} |
90 | | - ignore-codes: 'readme_reserved_contributors,WordPress.WP.I18n.TextDomainMismatch' |
| 85 | + - name: Run plugin check |
| 86 | + uses: wordpress/plugin-check-action@27b60e89aad9f3006d5c800a8fa9bbaa87c36421 # main |
| 87 | + with: |
| 88 | + build-dir: ./build/${{ matrix.plugin }} |
| 89 | + slug: ${{ matrix.plugin }} |
| 90 | + ignore-codes: 'readme_reserved_contributors,WordPress.WP.I18n.TextDomainMismatch' |
0 commit comments