Skip to content

Commit

Permalink
Merge pull request #30 from rtCamp/update/readme
Browse files Browse the repository at this point in the history
Update readme with SKIP_FOLDERS example
  • Loading branch information
mrrobot47 committed May 5, 2020
2 parents 6e2906c + 7ae73c6 commit 44c0817
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```
Expand All @@ -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/action-phpcs-code-review@v2.0.0`. 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).
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: 'This will run phpcs on PRs'
author: 'rtCamp'
runs:
using: 'docker'
image: 'Dockerfile'
image: 'docker://rtcamp/action-phpcs-code-review:v2.0.1'
branding:
icon: 'check-circle'
color: 'green'

0 comments on commit 44c0817

Please sign in to comment.