Skip to content

Instantly share code, notes, and snippets.

@anyxem
Created May 11, 2020 21:51
Show Gist options
  • Save anyxem/e831e7a4c66daf54e56ffc4e650db87e to your computer and use it in GitHub Desktop.
Save anyxem/e831e7a4c66daf54e56ffc4e650db87e to your computer and use it in GitHub Desktop.
#!/bin/bash
TIME="10"
URL="https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/sendMessage"
TEXT="Deploy status: $1%0A%0AProject:+$CI_PROJECT_NAME%0AURL:+$CI_PROJECT_URL/pipelines/$CI_PIPELINE_ID/%0ABranch:+$CI_COMMIT_REF_SLUG%0ALink:+$DOCS_LINK"
curl -s --max-time $TIME -d "chat_id=$TELEGRAM_USER_ID&disable_web_page_preview=1&text=$TEXT" $URL > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment