forked from contao/package-metadata
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.21 KB
/
lint.yaml
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
name: Validate the metadata syntax
on:
workflow_dispatch: ~
pull_request:
paths:
- 'meta/**'
schedule:
- cron: '0 12 * * 1'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Set up Aspell
run: sudo apt-get install aspell aspell-en aspell-de aspell-cs aspell-es aspell-fr
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: json
- uses: actions/checkout@v2
- run: git fetch --prune --unshallow
- name: Cache Composer vendor
uses: actions/cache@v1
with:
path: linter/vendor/
key: ${{ runner.os }}-linter-vendor
- name: Install Composer dependencies
run: cd linter && composer install --no-interaction --no-suggest
- name: Find changed files
run: |
echo "metafiles=$(git diff --name-only origin/main -- | grep -E "^meta/[^/]+/[^/]+/.+?\.(yml|json)" | uniq | tr '\n' ' ')" >> $GITHUB_ENV
- name: Lint files
run: linter/lint ${{ env.metafiles }}