Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

OskarStark/phpcs-ga

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GithubAction for PHPCS

Usage

You can use it as a Github Action like this:

.github/main.workflow

workflow "Main" {
  on = "push"
  resolves = ["PHPCS"]
}

action "PHPCS" {
  uses = "docker://oskarstark/phpcs-ga"
  secrets = ["GITHUB_TOKEN"]
}

Pass in the files and directories to be scanned as arguments.

workflow "Main" {
  on = "push"
  resolves = ["PHPCS"]
}

action "PHPCS" {
  uses = "docker://oskarstark/phpcs-ga"
  secrets = ["GITHUB_TOKEN"]
+  args = "/app"
}

to ignore annotations:

workflow "Main" {
  on = "push"
  resolves = ["PHPCS"]
}

action "PHPCS" {
  uses = "docker://oskarstark/phpcs-ga"
  secrets = ["GITHUB_TOKEN"]
+  args = "--ignore-annotations"
}

You can copy/paste the .github folder (under examples/) to your project and thats all!

Docker

A Docker-Image is built automatically and located here: https://hub.docker.com/r/oskarstark/phpcs-ga

You can run it in any given directory like this:

docker run --rm -it -w=/app -v ${PWD}:/app oskarstark/phpcs-ga:latest