Replace Travis CI with Github workflow

This commit is contained in:
GriffinR
2021-03-08 03:03:53 -05:00
parent 42b93f8359
commit b2f0efc6f7
5 changed files with 55 additions and 240 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/bash -ex
build_name=$1
map_file=$build_name.map
if [ ! -f $map_file ]; then
echo "$map_file does not exist!"
exit 1
fi
output=$(perl $(dirname "$0")/calcrom.pl $build_name.map | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\n/g')
curl -d "{\"username\": \"$CALCROM_DISCORD_WEBHOOK_USERNAME\", \"avatar_url\": \"$CALCROM_DISCORD_WEBHOOK_AVATAR_URL\", \"content\":\"\`\`\`$build_name progress:\\n$output\`\`\`\"}" -H "Content-Type: application/json" -X POST "$CALCROM_DISCORD_WEBHOOK_URL"