Provide more advanced examples
swinton opened this issue · comments
We should provide a few advanced examples:
- Using output in a downstream action
- Calling the repository dispatch API
- Create an installation access token and take some action as a third party GitHub App
- Send a tweet
- Philips Hue something something 🤔
- ...
Using output in a downstream action
One example of opening an issue in the current repo, and getting those issue details in a downstream action:
action "Open issue" {
uses = "swinton/httpie-action@master"
args = ["--auth-type=jwt", "--auth=$GITHUB_TOKEN", "POST", "api.github.com/repos/$GITHUB_REPOSITORY/issues", "title=Hello\\ world"]
secrets = ["GITHUB_TOKEN"]
}
action "Get issue details" {
needs = ["Open issue"]
uses = "actions/bin/sh@master"
args = ["cat $HOME/Open\\ issue.response.body"]
}