From f8ff399a81226ea8c926ac9a8b12fff972fd00a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorben=20G=C3=BCnther?= Date: Tue, 21 Feb 2023 15:00:19 +0100 Subject: [PATCH] CI: Switch to ntfy access token authentication --- .build.yml | 2 +- misc/run.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.build.yml b/.build.yml index 0938ff3..2be53a3 100644 --- a/.build.yml +++ b/.build.yml @@ -9,7 +9,7 @@ packages: - yamllint secrets: - 53b93b8f-a1a6-40d7-8374-8ee7f5b92c8b - - f86bd7ec-552a-47b2-8269-b31f784fe433 + - 01923d41-685b-46b1-b3e1-0ec16eb3ec24 sources: - https://git.xenrox.net/~xenrox/ansible environment: diff --git a/misc/run.py b/misc/run.py index acd6237..cdf7a55 100755 --- a/misc/run.py +++ b/misc/run.py @@ -14,7 +14,7 @@ playbook = "playbooks/" + playbook_name + ".yml" r = ansible_runner.run(private_data_dir=".", playbook=playbook) build_url = environ["JOB_URL"] -ntfy_auth = environ["NTFY_BASIC_AUTH"] +ntfy_token = environ["NTFY_ACCESS_TOKEN"] changes_list = list(r.stats["changed"].values()) changes = 0 priority = "4" @@ -30,7 +30,7 @@ if changes == 0: post( "https://ntfy.xenrox.net/infrastructure", headers={ - "Authorization": "Basic " + ntfy_auth, + "Authorization": "Bearer " + ntfy_token, "X-Title": "Ansible " + playbook_name, "X-Priority": priority, "X-Click": build_url, -- 2.44.0