Merge pull request #4 from imbsky/readme

Update usage to the new yml syntax
This commit is contained in:
Andy McKay
2019-10-08 08:26:00 -07:00
committed by GitHub

View File

@@ -6,47 +6,65 @@ 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:
resolves = "Apply Triage Label" issues:
} types: [opened]
jobs:
action "Apply Triage Label" { applyTriageLabel:
uses = "actions/github@v1.0.0" name: Apply Triage Label
args = "label triage --action=opened" # Only when issues are opened! runs-on: ubuntu-latest
secrets = ["GITHUB_TOKEN"] steps:
} - uses: actions/checkout@master
- name: Apply Triage Label
uses: actions/github@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: label triage
``` ```
## Commenting on an issue ## Commenting on an issue
```workflow ```yml
workflow "Triage" { name: Triage
on = "issue" on:
resolves = "Comment On New Issues" issues:
} types: [opened]
jobs:
action "Comment On New Issues" { commentOnNewIssues:
uses = "actions/github@v1.0.0" name: Comment On New Issues
args = "comment "Hello World" --action=opened" # Only when issues are opened! runs-on: ubuntu-latest
secrets = ["GITHUB_TOKEN"] steps:
} - uses: actions/checkout@master
- name: Comment On New Issues
uses: actions/github@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: comment "Hello World"
``` ```
## Assigning any newly created issues ## Assigning any newly created issues
```workflow ```yml
workflow "Triage" { name: Triage
on = "issue" on:
resolves = "Assign MonaLisa" issues:
} types: [opened]
jobs:
action "Assign MonaLisa" { assignMonaLisa:
uses = "actions/github@v1.0.0" name: Assign MonaLisa
args = "assign @monalisaoctocat --action=opened" # Only when issues are opened! runs-on: ubuntu-latest
secrets = ["GITHUB_TOKEN"] steps:
} - uses: actions/checkout@master
- name: Assign MonaLisa
uses: actions/github@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: assign @monalisaoctocat
``` ```
## Contributing ## Contributing