-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (38 loc) · 1.17 KB
/
validate-plugin-toml.yml
File metadata and controls
46 lines (38 loc) · 1.17 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
name: Validate Plugin TOML
on:
pull_request:
branches:
- master
paths:
- 'plugins/**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Get changed plugins
id: changed
run: |
CHANGED_PLUGINS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep '^plugins/' | cut -d'/' -f2 | sort -u | tr '\n' ' ')
echo "plugins=$CHANGED_PLUGINS" >> $GITHUB_OUTPUT
echo "Changed plugins: $CHANGED_PLUGINS"
- name: Setup Node.js
if: steps.changed.outputs.plugins != ''
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Setup pnpm
if: steps.changed.outputs.plugins != ''
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
if: steps.changed.outputs.plugins != ''
run: pnpm install
- name: Validate plugin.toml files
if: steps.changed.outputs.plugins != ''
run: pnpm validate ${{ steps.changed.outputs.plugins }}