mirror of
				https://github.com/ohwgiles/laminar.git
				synced 2025-06-13 12:54:29 +00:00 
			
		
		
		
	add example telegram notification
This commit is contained in:
		
							parent
							
								
									c774acbb98
								
							
						
					
					
						commit
						9974df21ce
					
				
							
								
								
									
										18
									
								
								examples/notify-telegram.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										18
									
								
								examples/notify-telegram.sh
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,18 @@ | ||||
| #!/bin/bash -e | ||||
| 
 | ||||
| # Sends a message from a specified bot to a specific telegram chat ID. | ||||
| # See https://core.telegram.org/bots | ||||
| 
 | ||||
| # IMPORTANT: modify this to your real bot token and chat ID | ||||
| BOT_TOKEN=123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11 | ||||
| CHAT_ID=10000000 | ||||
| 
 | ||||
| LAMINAR_URL=${LAMINAR_BASE_URL:-http://localhost:8080} | ||||
| 
 | ||||
| [[ $(curl -sS https://api.telegram.org/bot$BOT_TOKEN/sendMessage \ | ||||
| 	-d chat_id=$CHAT_ID \ | ||||
| 	-d parse_mode=HTML \ | ||||
| 	-d text="<a href=\"$LAMINAR_URL/jobs/$JOB/$RUN\">$JOB #$RUN</a> $RESULT" \ | ||||
| 	| jq .ok) == true ]] | ||||
| 
 | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user