Skip to content

Add GitHub Copilot instructions for repository #212

Add GitHub Copilot instructions for repository

Add GitHub Copilot instructions for repository #212

Workflow file for this run

name: Plugin Check
on:
workflow_dispatch:
push:
branches:
- develop
- trunk
pull_request:
types:
- opened
- synchronize
- ready_for_review
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
permissions: {}
jobs:
prepare-matrix:
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
plugins: ${{ steps.set-matrix.outputs.plugins }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
with:
php-version: '8.3'
- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
cache: npm
- name: npm install
run: npm ci
- name: Build plugins
run: npm run build-plugins
- name: Upload built plugins
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: built-plugins
path: build/
retention-days: 1
- name: Generate matrix
id: set-matrix
run: |
PLUGINS=$(jq -c '.plugins' plugins.json)
echo "plugins=$PLUGINS" >> $GITHUB_OUTPUT
plugin-check:
needs: prepare-matrix
name: Check ${{ matrix.plugin }}
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
plugin: ${{ fromJson(needs.prepare-matrix.outputs.plugins) }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Download built plugins
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: built-plugins
path: build
- name: Run plugin check
uses: wordpress/plugin-check-action@d746dd94fcef98cefd3a8dc03b4dc6341d87612b # main
with:
build-dir: ./build/${{ matrix.plugin }}
slug: ${{ matrix.plugin }}
ignore-codes: 'readme_reserved_contributors,WordPress.WP.I18n.TextDomainMismatch'