-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
59 lines (58 loc) · 1.98 KB
/
action.yml
File metadata and controls
59 lines (58 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Validate Plugin Tested Up To Version
description: A GitHub action that validates the last tested plugin version against the current version of WordPress.
author: jazzsequence
branding:
icon: file-plus
color: orange
inputs:
plugin-path:
description: The path to the plugin to validate.
required: false
default: '.'
dry-run:
description: Whether to actually commit the changes to the repository.
required: false
default: false
gh-token:
description: The GitHub token to use for creating a pull request.
required: false
default: ${{ github.token }}
filenames:
description: The filenames to check for the tested up to version. Default is 'readme.txt,README.md'.
required: false
default: 'readme.txt,README.md'
branch:
description: The branch to use as the base for PRs and commit the changes back to.
required: false
pr-status:
description: The status of the PR to create. Default is 'draft'. Accepts 'draft' or 'open'.
required: false
default: 'draft'
validation-level:
description: The validation level to use. Accepts 'patch' or 'minor'.
required: false
default: 'minor'
runs:
using: composite
steps:
- uses: actions/checkout@v6
- name: Debug Action Environment
shell: bash
run: |
echo "Current working directory:"
pwd
echo "Contents of action directory (looking for bin/validate-plugin-version.sh):"
ls -R
- name: Validate Plugin Tested Up To Version
shell: bash
env:
PLUGIN_PATH: ${{ inputs.plugin-path }}
DRY_RUN: ${{ inputs.dry-run }}
WORKFLOW_PATH: ${{ github.workspace }}
GH_TOKEN: ${{ inputs.gh-token }}
FILENAMES: ${{ inputs.filenames }}
BRANCH: ${{ inputs.branch }}
PR_STATUS: ${{ inputs.pr-status }}
GITHUB_BASE_REF: ${{ github.base_ref }}
VALIDATION_LEVEL: ${{ inputs.validation-level }}
run: bash ${{ github.action_path }}/bin/validate-plugin-version.sh