Update usage to the new yml syntax
This commit is contained in:
78
README.md
78
README.md
@@ -6,47 +6,59 @@ Here are a few use cases for this action:
|
|||||||
|
|
||||||
## Applying a "triage" label on any new issue:
|
## Applying a "triage" label on any new issue:
|
||||||
|
|
||||||
```workflow
|
```yml
|
||||||
workflow "Triage" {
|
name: Triage
|
||||||
on = "issue"
|
on: [issues]
|
||||||
resolves = "Apply Triage Label"
|
jobs:
|
||||||
}
|
applyTriageLabel:
|
||||||
|
name: Apply Triage Label
|
||||||
action "Apply Triage Label" {
|
runs-on: ubuntu-latest
|
||||||
uses = "actions/github@v1.0.0"
|
steps:
|
||||||
args = "label triage --action=opened" # Only when issues are opened!
|
- uses: actions/checkout@master
|
||||||
secrets = ["GITHUB_TOKEN"]
|
- name: Apply Triage Label
|
||||||
}
|
uses: actions/github@v1.0.0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: label triage --action=opened
|
||||||
```
|
```
|
||||||
|
|
||||||
## Commenting on an issue
|
## Commenting on an issue
|
||||||
|
|
||||||
```workflow
|
```yml
|
||||||
workflow "Triage" {
|
name: Triage
|
||||||
on = "issue"
|
on: [issues]
|
||||||
resolves = "Comment On New Issues"
|
jobs:
|
||||||
}
|
commentOnNewIssues:
|
||||||
|
name: Comment On New Issues
|
||||||
action "Comment On New Issues" {
|
runs-on: ubuntu-latest
|
||||||
uses = "actions/github@v1.0.0"
|
steps:
|
||||||
args = "comment "Hello World" --action=opened" # Only when issues are opened!
|
- uses: actions/checkout@master
|
||||||
secrets = ["GITHUB_TOKEN"]
|
- name: Comment On New Issues
|
||||||
}
|
uses: actions/github@v1.0.0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: comment "Hello World" --action=opened
|
||||||
```
|
```
|
||||||
|
|
||||||
## Assigning any newly created issues
|
## Assigning any newly created issues
|
||||||
|
|
||||||
```workflow
|
```yml
|
||||||
workflow "Triage" {
|
name: Triage
|
||||||
on = "issue"
|
on: [issues]
|
||||||
resolves = "Assign MonaLisa"
|
jobs:
|
||||||
}
|
assignMonaLisa:
|
||||||
|
name: Assign MonaLisa
|
||||||
action "Assign MonaLisa" {
|
runs-on: ubuntu-latest
|
||||||
uses = "actions/github@v1.0.0"
|
steps:
|
||||||
args = "assign @monalisaoctocat --action=opened" # Only when issues are opened!
|
- uses: actions/checkout@master
|
||||||
secrets = ["GITHUB_TOKEN"]
|
- name: Assign MonaLisa
|
||||||
}
|
uses: actions/github@v1.0.0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: assign @monalisaoctocat --action=opened
|
||||||
```
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
Reference in New Issue
Block a user