-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from rtCamp/update/readme
Update readme with SKIP_FOLDERS example
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,16 +21,20 @@ name: Run PHPCS on pull requests | |
|
||
on: pull_request | ||
|
||
name: Inspections | ||
jobs: | ||
phpcs: | ||
name: Run PHPCS inspection | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- uses: docker://rtcamp/action-phpcs-code-review:v2.0.0 | ||
- name: Run PHPCS inspection | ||
uses: rtCamp/action-phpcs-code-review@master | ||
env: | ||
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} | ||
SKIP_FOLDERS: "tests,.github" | ||
with: | ||
args: "WordPress,WordPress-Core,WordPress-Docs" | ||
``` | ||
|
@@ -43,10 +47,6 @@ By default, pull request will be reviwed using WordPress coding and documentatio | |
|
||
4. In case you want to skip PHPCS scanning in any pull request, add `[do-not-scan]` in the PR description. You can add it anywhere in the description and it will skip the action run for that pull request. | ||
|
||
--- | ||
|
||
Side note: in the usage example, we have used `docker://rtcamp/action-phpcs-code-review:v2.0.0`, which is the docker image set up with automated builds on this repo. It will always have the latest code of this repo. Instead of using docker image you can also use the repo url in it: `rtCamp/[email protected]`. The disadvantage using the repo url is that GitHub actions now builds the docker image from url every time action is executed (does not cache the docker image after first run _by default_ as it used to do in beta. You need to cache them seprately). That consumes a fairly good amount of time in action run. Leading to a longer running job as well as more billing (if used in private repo). | ||
|
||
## GitHub Token Creation | ||
|
||
You can create [GitHub Token from here](https://github.com/settings/tokens). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters