mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-09-20 09:59:06 +07:00
Add configurable verbosity and guarded shell tracing
This commit is contained in:
@@ -527,6 +527,13 @@ On GitHub Actions you can assign the `setup-php` step an `id`, you can use the s
|
||||
- By default, it is set to `false`.
|
||||
- See [force update setup](#force-update-setup) for more info.
|
||||
|
||||
#### `verbose` (optional)
|
||||
|
||||
- Specify to enable verbose output.
|
||||
- Accepts `true`, `false`, `v`, `vv` and `vvv`.
|
||||
- By default, it is set to `false`.
|
||||
- See [verbose setup](#verbose-setup) for more info.
|
||||
|
||||
See below for more info.
|
||||
|
||||
### Basic Setup
|
||||
@@ -655,13 +662,19 @@ jobs:
|
||||
|
||||
> Debug your workflow
|
||||
|
||||
To debug any issues, you can use the `verbose` tag instead of `v2`.
|
||||
- Set the `verbose` environment variable to `true` or `v` to show command output.
|
||||
- Set `verbose` to `vv` or `vvv` to also enable `set -x` on Linux and macOS.
|
||||
- On Windows, `vv` enables `Set-PSDebug -Trace 1` and `vvv` enables `Set-PSDebug -Trace 2`.
|
||||
- Enabling [GitHub Actions debug logging](https://docs.github.com/en/actions/how-tos/monitor-workflows/enable-debug-logging) (`RUNNER_DEBUG=1`) also enables verbose mode.
|
||||
- The `verbose` and `more-verbose` tags have been deprecated and will be discontinued in the next major release.
|
||||
|
||||
```yaml
|
||||
- name: Setup PHP with logs
|
||||
uses: shivammathur/setup-php@verbose
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.5'
|
||||
env:
|
||||
verbose: true
|
||||
```
|
||||
|
||||
### Multi-Arch Setup
|
||||
@@ -995,7 +1008,7 @@ Examples of using `setup-php` with various PHP frameworks and packages.
|
||||
- Semantic release versions can also be used. It is recommended to [use dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot "Setup Dependabot with GitHub Actions") with semantic versioning to keep the actions in your workflows up to date.
|
||||
- Commit SHA can also be used, but is not recommended unless you set up tooling to update them with each release of the action.
|
||||
- A new major version of the action will only be tagged when there are breaking changes in the setup-php API i.e. - inputs, outputs, and environment flags.
|
||||
- For debugging any issues `verbose` tag can be used temporarily. It outputs all the logs and is also synced with the latest releases.
|
||||
- For debugging any issues, use the [`verbose` environment variable](#verbose-setup).
|
||||
- It is highly discouraged to use the `main` branch as the version, it might break your workflow after major releases as they have breaking changes.
|
||||
- If you are using the `v1` tag or a `1.x.y` version, you should [switch to v2](https://github.com/shivammathur/setup-php/wiki/Switch-to-v2 "Guide for switching from setup-php v1 to v2") as `v1` is not supported anymore.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user