Skip to content

A GitHub action that validates the last tested plugin version against the current version of WordPress.

License

Notifications You must be signed in to change notification settings

jazzsequence/action-validate-plugin-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Validate WordPress Plugin "Tested Up To" Version

GitHub License Validate Plugin Version Test

A GitHub action that validates the last tested plugin version against the current version of WordPress.

Usage

name: Validate Plugin Version
on:
  schedule:
    - cron: '0 0 * * 0'
permissions:
  contents: write
  pull-requests: write
  
jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Validate Plugin Version
        uses: jazzsequence/action-validate-plugin-version@v1
        with:
          plugin-path: 'path/to/plugin-slug/'
          filenames: 'readme.txt,README.MD'
          branch: 'main'

Configuration

Your actions/checkout action must include fetch-depth. fetch-depth: 0 ensures that all branches are pulled which is necessary for ensuring that the correct branch is used to create the pull request against.

Inputs

plugin-path

The path to the plugin directory to validate. If not specified, the action will use the project root.

dry-run

Only used in self-testing. If passed, this will not actually create a PR against the repository.

gh-token

The GitHub token to use for creating a PR. If not specified, the action will use the default GitHub token.

filenames

A comma-separated list of filenames to check for the "Tested Up To" version. If not specified, the action will use readme.txt and README.md.

branch

The branch to create the PR against. If not specified, the action will use the main branch.

Permissions

The write permissions on contents and pull-requests are important. They are required for the action to commit the changes back to the repository and open a pull request. The only files affected by the action are files named readme.txt, README.md or those files matching the pattern (looking for "Tested Up To" in the file) that have been specified in the filenames input.

About

A GitHub action that validates the last tested plugin version against the current version of WordPress.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages