https://github.com/impresscms-dev/filter-php-class-list-with-glob-like-rules-action
GitHub action to filter PHP class list with Glob like syntax
https://github.com/impresscms-dev/filter-php-class-list-with-glob-like-rules-action
filter github-actions hacktoberfest php
Last synced: 6 months ago
JSON representation
GitHub action to filter PHP class list with Glob like syntax
- Host: GitHub
- URL: https://github.com/impresscms-dev/filter-php-class-list-with-glob-like-rules-action
- Owner: impresscms-dev
- License: mit
- Created: 2022-06-18T15:11:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-01T03:18:02.000Z (7 months ago)
- Last Synced: 2024-11-10T04:19:07.644Z (6 months ago)
- Topics: filter, github-actions, hacktoberfest, php
- Language: TypeScript
- Homepage:
- Size: 620 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](LICENSE)
[](https://github.com/impresscms-dev/filter-php-class-list-with-glob-like-rules-action/releases)# Filter PHP class list with glob like rules
GitHub action to filter PHP class list with [Glob like syntax](https://en.wikipedia.org/wiki/Glob_(programming)).
We recommend to use this GitHub action with [impresscms-dev/generate-php-project-classes-list-file-action](https://github.com/impresscms-dev/generate-php-project-classes-list-file-action).
## Usage
To use this action in your project, create workflow in your project similar to this code (Note: some parts and arguments needs to be altered):
```yaml
name: Get filtered PHP classes liston:
push:jobs:
get_filtered_php_classes_list:
runs-on: ubuntu-latest
steps:
- name: Checkouting project code...
uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: curl, gd, pdo_mysql, json, mbstring, pcre, session
ini-values: post_max_size=256M
coverage: none
tools: composer:v2
- name: Install Composer dependencies (with dev)
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Getting PHP classes list...
uses: impresscms-dev/[email protected]
with:
output_file: ./php-classes.lst
- uses: DamianReeves/[email protected]
with:
path: ./filtering-rules.lst
contents: |
ImpressCMS\**
write-mode: overwrite
- name: Filtering PHP classes list...
uses: impresscms-dev/[email protected]
with:
rules_file: ./filtering-rules.lst
input_file: ./php-classes.lst
output_file: ./php-classes-filtered.lst
- uses: actions/upload-artifact@v3
with:
name: my-artifact
path: ./php-classes-filtered.lst
```## Arguments
This action supports such arguments (used in `with` keyword):
| Argument | Required | Default value | Description |
|-------------|----------|----------------------|-----------------------------------|
| rules_file | Yes | | File with rules list (each rule separate line - like [.gitignore](https://git-scm.com/docs/gitignore)) |
| input_file | Yes | | File with PHP class names list |
| output_file | Yes | | File where result will be written |## How to contribute?
If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try [interactive GitHub tutorial](https://skills.github.com).
If you found any bug or have some questions, use [issues tab](https://github.com/impresscms-dev/filter-php-class-list-with-glob-like-rules-action/issues) and write there your questions.