Skip to content

Instantly share code, notes, and snippets.

@skierkowski
Created June 5, 2014 16:26
Show Gist options
  • Save skierkowski/f62e0ec112f34dfd1e7e to your computer and use it in GitHub Desktop.
Save skierkowski/f62e0ec112f34dfd1e7e to your computer and use it in GitHub Desktop.
This Workflow listens in the factor-io/console room in Gitter for someone to say "deploy xyz" (where 'xyz' is the branch).
listen 'gitter','room_message', room:'factor-io/console', filter:'deploy ([a-zA-Z]*)' do |chat_info|
run 'github','download_repo',repo:'console',username:'factor-io', branch:chat_info['matches'][0] do |repo_info|
run 'heroku','deploy',resource_id:repo_info['resource']['id'], app:'factor-console' do |heroku_info|
run 'gitter','send', room:'factor-io/console', message:"Console deployed, release #{heroku_info['release']}"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment