From 1676f2020d549a6e82d84ae7ffd579d3ff9f4d45 Mon Sep 17 00:00:00 2001 From: Camille Frantz Date: Mon, 9 Jun 2025 00:31:17 -0500 Subject: [PATCH] alpine_test didnt't get added --- .gitea/workflows/alpine_test.yaml | 3 ++- alpine_test.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 alpine_test.py diff --git a/.gitea/workflows/alpine_test.yaml b/.gitea/workflows/alpine_test.yaml index cc4b5e8..7e80422 100644 --- a/.gitea/workflows/alpine_test.yaml +++ b/.gitea/workflows/alpine_test.yaml @@ -3,7 +3,8 @@ on: push: jobs: deploy: - runs-on: alpine:latest + runs-on: ubuntu-latest + container: alpine:latest steps: - uses: actions/checkout@v4 - name: setup python diff --git a/alpine_test.py b/alpine_test.py new file mode 100644 index 0000000..f940879 --- /dev/null +++ b/alpine_test.py @@ -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)