Skip to content

Commit

Permalink
Convert to new YAML syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
tdutrion authored and OskarStark committed Aug 14, 2019
1 parent de7a8f0 commit 8f9f635
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 27 deletions.
41 changes: 23 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,34 @@

You can use it as a Github Action like this:

_.github/main.workflow_
_.github/workflows/push.yml_
```
workflow "Main" {
on = "push"
resolves = ["PHP-CS-Fixer"]
}
action "PHP-CS-Fixer" {
uses = "docker://oskarstark/php-cs-fixer-ga"
}
on: push
name: Main
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
```

_to use a custom config for example, --diff and --dry-run option:_
```diff
workflow "Main" {
on = "push"
resolves = ["PHP-CS-Fixer"]
}

action "PHP-CS-Fixer" {
uses = "docker://oskarstark/php-cs-fixer-ga"
+ args = "--config=.project.php_cs --diff --dry-run"
}
on: push
name: Main
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
+ with:
+ args: --config=.project.php_cs --diff --dry-run
```

**You can copy/paste the .github folder (under examples/) to your project and thats all!**
Expand Down
9 changes: 0 additions & 9 deletions examples/.github/main.workflow

This file was deleted.

12 changes: 12 additions & 0 deletions examples/.github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
on: push
name: Main
jobs:
php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --diff --dry-run

0 comments on commit 8f9f635

Please sign in to comment.