Compare commits

6 Commits

Author SHA1 Message Date
Jonathan Clem
8436f278d0 Update README.md 2020-04-13 11:49:49 -04:00
Jonathan Clem
b3c7084018 Merge pull request #6 from actions/readme-checkout
Update checkout steps in readme
2020-02-13 14:20:26 -05:00
Bryan MacFarlane
187d5cb76c Update checkout steps in readme
checkout should reference v2 per https://github.com/actions/checkout#checkout-v2
2020-01-22 06:39:03 -05:00
Andy McKay
7b6e5d609a Merge pull request #4 from imbsky/readme
Update usage to the new yml syntax
2019-10-08 08:26:00 -07:00
BSKY
502b44798b Update README.md 2019-10-08 11:03:40 +09:00
BSKY
dbb409409b Update usage to the new yml syntax 2019-09-10 22:57:05 +09:00

View File

@@ -1,52 +1,72 @@
# GitHub Action for GitHub
🚨 **This action is deprecated! Please use [actions/github-script](https://github.com/actions/github-script), instead.**
This action conveniently wraps [actions-toolkit](https://github.com/JasonEtco/actions-toolkit), making it simple to do things like label, assign, and comment on issues on GitHub.
Here are a few use cases for this action:
## Applying a "triage" label on any new issue:
```workflow
workflow "Triage" {
on = "issue"
resolves = "Apply Triage Label"
}
action "Apply Triage Label" {
uses = "actions/github@v1.0.0"
args = "label triage --action=opened" # Only when issues are opened!
secrets = ["GITHUB_TOKEN"]
}
```yml
name: Triage
on:
issues:
types: [opened]
jobs:
applyTriageLabel:
name: Apply Triage Label
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Apply Triage Label
uses: actions/github@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: label triage
```
## Commenting on an issue
```workflow
workflow "Triage" {
on = "issue"
resolves = "Comment On New Issues"
}
action "Comment On New Issues" {
uses = "actions/github@v1.0.0"
args = "comment "Hello World" --action=opened" # Only when issues are opened!
secrets = ["GITHUB_TOKEN"]
}
```yml
name: Triage
on:
issues:
types: [opened]
jobs:
commentOnNewIssues:
name: Comment On New Issues
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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
```workflow
workflow "Triage" {
on = "issue"
resolves = "Assign MonaLisa"
}
action "Assign MonaLisa" {
uses = "actions/github@v1.0.0"
args = "assign @monalisaoctocat --action=opened" # Only when issues are opened!
secrets = ["GITHUB_TOKEN"]
}
```yml
name: Triage
on:
issues:
types: [opened]
jobs:
assignMonaLisa:
name: Assign MonaLisa
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Assign MonaLisa
uses: actions/github@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: assign @monalisaoctocat
```
## Contributing