GitHub Action: Ruby Recipe
Use this to kickstart building an Action with Ruby.
- In your Repository, create a new folder for your Action under
mkdir .github/my_ruby_action cd .github/my_ruby_action
- Next, copy
action.rbfrom this repository into your new folder.
Here are some easy commands to download them.
curl https://raw.githubusercontent.com/mscoutermarsh/ruby-action-recipe/master/action.rb > action.rb curl https://raw.githubusercontent.com/mscoutermarsh/ruby-action-recipe/master/Dockerfile > Dockerfile curl https://raw.githubusercontent.com/mscoutermarsh/ruby-action-recipe/master/entrypoint.sh > entrypoint.sh
- Commit and push up your changes.
Running your new Action
- Visit the Actions tab for your repository.
Setup your workflow to trigger whenever an Issue receives a comment.
issue_comment event is currently only available in private repos. If you're doing this in a public repo, use
push for now.
Be sure to click
GITHUB_TOKEN so that your Action can use the GitHub API.
- Commit your change.
Trigger the event
Now the fun part. Trigger your event by commenting on an issue in your repo. Then check the Actions tab to see your Action run.
Take a look at the logs and you'll see the output from the
puts calls in your Ruby script.