-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
50 lines (44 loc) · 1.69 KB
/
action.yml
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
name: 'lean-package-validator'
description: "An GitHub action that validates a micro-package for its leanness. A project/micro-package is considered `lean` when its common repository artifacts won't be included in the release assets."
author: 'Raphael Stolt'
branding:
icon: 'package'
color: 'green'
inputs:
php-version:
description: 'The PHP version to run the lean-package-validator at e.g. 8.1.'
required: true
default: '8.1'
lpv-version:
description: 'The version of the lean-package-validator to install.'
required: true
default: '4.0.5'
glob-pattern:
description: "The Glob pattern describing artifact files to exclude from release assets e.g. '{.*,*.rst,*.py[cod],dist/}'."
required: false
default: 'use-lpv-file'
verbose:
description: 'Increase verbosity of the output messages.'
required: false
default: 'false'
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: raphaelstolt/lean-package-validator-action
sparse-checkout: |
bin
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{inputs.php-version}}"
- name: Install lean package validator
run: wget --quiet https://github.com/raphaelstolt/lean-package-validator/releases/download/v${{inputs.lpv-version}}/lean-package-validator.phar && sudo mv lean-package-validator.phar /usr/bin/lpv && sudo chmod u+x /usr/bin/lpv
shell: bash
- name: Run the lean package validator
run: |
chmod u+x bin/lpv-runner.php
./bin/lpv-runner.php --directory ${GITHUB_WORKSPACE} ${{inputs.verbose}} ${{inputs.glob-pattern}}
shell: bash