re-add Paul Hsieh header
[awesomized/libmemcached] / .github / notify-gitter.sh
1 #!/usr/bin/env bash
2 REPO=${GITHUB_REPOSITORY}
3
4 REF=$(basename ${GITHUB_REF})
5 REF_URL=https://github.com/${REPO}/commits/${REF}
6
7 BUILD_URL=https://github.com/${REPO}/actions/runs/${GITHUB_RUN_ID}
8 BUILD_ENV=${ImageOS}/${CC:-${CC_VND}-${CC_VER}}
9
10 case "$1" in
11 1|true|success)
12 level=info
13 status=success
14 ;;
15 *)
16 level=error
17 status=failure
18 ;;
19 esac
20 message="Github [${REPO}](${REF_URL}) (${REF}) [${status}](${BUILD_URL}) (${BUILD_ENV})"
21
22 curl -sS "${GITTER}" --data-urlencode "level=${level}" --data-urlencode "message=${message}"
23