https://github.com/nxtlvlsoftware/setup-phpstan-action
GitHub action for installing PHPStan in workflows.
https://github.com/nxtlvlsoftware/setup-phpstan-action
Last synced: 3 months ago
JSON representation
GitHub action for installing PHPStan in workflows.
- Host: GitHub
- URL: https://github.com/nxtlvlsoftware/setup-phpstan-action
- Owner: NxtLvLSoftware
- License: mit
- Created: 2022-07-28T02:54:25.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-30T17:30:45.000Z (over 2 years ago)
- Last Synced: 2025-02-15T06:36:19.612Z (3 months ago)
- Size: 14 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Action nxtlvlsoftware/setup-phpstan-action
GitHub action for installing [PHPStan](https://github.com/phpstan/phpstan) in actions workflows.
- [x] Allows passing version string and installing from github releases into path/env.
- [x] Allows passing existing executable path and installing into path/env.
- [x] Supports caching for version string and existing binary installations.| Action Input | Required | Default | Description |
| ------------ | -------- | -------- | ------------------------------------------------------------------------------------- |
| install-path | true | | The path to install PHPStan binary to. |
| version | false | latest | The target PHPStan version to install. Exact versions only (8.0.11, 7.4.24, etc.) |
| path | false | false | Path to an existing PHPStan installation. |Either `version` or `path` must be specified.
## How to use
Attempt to download any PHPStan release by providing the version:```yml
name: My PHPStan Workflow
on: [push]
jobs:
setup-phpstan:
name: Setup PHPStan
runs-on: ubuntu-latest
steps:
- uses: nxtlvlsoftware/setup-phpstan-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: '1.8.2'
install-path: './bin'
```Forwarding the `$GIHUB_TOKEN` environment variable is required to properly configure PHPStan as we
interact with the GitHub API to fetch version information.Or provide the path to an existing PHPStan installation/binary:
```yml
name: My PHPStan Workflow
on: [push]
jobs:
setup-phpstan:
name: Setup PHPStan
runs-on: ubuntu-latest
steps:
- uses: nxtlvlsoftware/setup-phpstan-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: 'path/to/your/phpstan.phar'
install-path: './bin'
```## License
`nxtlvlsoftware/setup-phpstan-action` is open-sourced software licensed under the [MIT license](LICENSE).