alpine_test didnt't get added
This commit is contained in:
@ -3,7 +3,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: alpine:latest
|
runs-on: ubuntu-latest
|
||||||
|
container: alpine:latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: setup python
|
- name: setup python
|
||||||
|
22
alpine_test.py
Normal file
22
alpine_test.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from requests import get, post
|
||||||
|
from globals import *
|
||||||
|
from json import loads
|
||||||
|
from munch import DefaultMunch
|
||||||
|
|
||||||
|
def notify(priority, message):
|
||||||
|
r = post("https://api.pushover.net/1/messages.json", data = {
|
||||||
|
"token": po_bots_token,
|
||||||
|
"user": po_user_token,
|
||||||
|
"message": "alpine testing: " + message,
|
||||||
|
"priority": priority
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
url = 'https://httpbin.org/get'
|
||||||
|
|
||||||
|
response = get(url)
|
||||||
|
if response.reason == "OK":
|
||||||
|
data = DefaultMunch.fromDict(loads(response.text.replace('-', '_')))
|
||||||
|
notify(-1, data.headers.User_Agent)
|
||||||
|
else:
|
||||||
|
notify(-1, response.reason)
|
Reference in New Issue
Block a user