Skip to content

Instantly share code, notes, and snippets.

@vistik
Created October 9, 2014 14:35
Show Gist options
  • Save vistik/d088e56e16866f056456 to your computer and use it in GitHub Desktop.
Save vistik/d088e56e16866f056456 to your computer and use it in GitHub Desktop.
Laravel forge post to slack channel on deploy
SHA=$(git rev-parse --verify HEAD)
SHA="==== NEW DEPLOY ==== \n\n https://github.com/<USERNAME>/<REPO>/commit/$SHA deployed to http://<site.project.com> \n"
curl -X POST --data-urlencode 'payload={"channel": "#devops", "username": "Laravel Forge", "text": "'"$SHA"'", "icon_emoji": ":shipit:"}' https://<USERNAME>.slack.com/services/hooks/incoming-webhook?token=<TOKEN>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment