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 # 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. 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: 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@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 ## 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@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 ## 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@v2
- name: Assign MonaLisa
uses: actions/github@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: assign @monalisaoctocat
``` ```
## Contributing ## Contributing