diff --git a/README.md b/README.md index f27bfba..7a3ceb5 100644 --- a/README.md +++ b/README.md @@ -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/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). diff --git a/action.yml b/action.yml index 7fbd94b..fe273d5 100644 --- a/action.yml +++ b/action.yml @@ -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'