From e607dc167bef9a5d71b103c3d4df62cd1059a31b Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 16:29:57 +0100 Subject: [PATCH 01/15] Include ntfy notification --- .gitea/workflows/demo.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 3c2941c..e63a990 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -21,3 +21,11 @@ jobs: - name: Run e2e tests run: npm run e2e + - name: ntfy-notifications + uses: niniyas/ntfy-action@master + with: + url: ${{ secrets.NTFY_URL }} + topic: ${{ secrets.NTFY_TOPIC }} + headers: ${{ secrets.NTFY_HEADERS }} + + -- 2.34.1 From 9cc93cd9e2701d7d260c1be110652540567efbf0 Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 16:42:52 +0100 Subject: [PATCH 02/15] Incude authorization header --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index e63a990..87f2c3c 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: ${{ secrets.NTFY_HEADERS }} + headers: '{"authorization": ${{ secrets.NTFY_HEADERS }}}' -- 2.34.1 From 03528700ecec4ec0c968b0298b92e8f53177b58f Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 16:51:17 +0100 Subject: [PATCH 03/15] Remove specific auth --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 87f2c3c..e63a990 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: '{"authorization": ${{ secrets.NTFY_HEADERS }}}' + headers: ${{ secrets.NTFY_HEADERS }} -- 2.34.1 From 4839c2362ed49064cf0ea5b823a381cc783424d3 Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 16:54:19 +0100 Subject: [PATCH 04/15] Bearer Token directly in workflow --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index e63a990..8559ee9 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: ${{ secrets.NTFY_HEADERS }} + headers: {"authorization": "Bearer tk_fbhpf1fpuea0qneljvhp7jvt68lmb"} -- 2.34.1 From 83591580daa56cccf5b2affdb2340d0610cfe25a Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 16:54:57 +0100 Subject: [PATCH 05/15] Include '' --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 8559ee9..7aca8f6 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: {"authorization": "Bearer tk_fbhpf1fpuea0qneljvhp7jvt68lmb"} + headers: '{"authorization": "Bearer tk_fbhpf1fpuea0qneljvhp7jvt68lmb"}' -- 2.34.1 From c5e77b7b4bb15723afeff15ae96a49c328e8cbbb Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 19:25:54 +0100 Subject: [PATCH 06/15] Use Secret instead of plain auth token --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 7aca8f6..9479c39 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: '{"authorization": "Bearer tk_fbhpf1fpuea0qneljvhp7jvt68lmb"}' + headers: '{"authorization": "${{ NTFY_HEADERS }}"}' -- 2.34.1 From 421929f4284c615d29b3e5bd4d08344d5ead1454 Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 19:34:23 +0100 Subject: [PATCH 07/15] Try Without auth keyword in workflow-file --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 9479c39..91bb0f7 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: '{"authorization": "${{ NTFY_HEADERS }}"}' + headers: '${{ NTFY_HEADERS }}' -- 2.34.1 From 950e5c6862a47fc97e5595429518cf8b157e850d Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 19:36:37 +0100 Subject: [PATCH 08/15] fix typo (secrets.ntfy_headers) --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 91bb0f7..49a5a1c 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: '${{ NTFY_HEADERS }}' + headers: '${{ secrets.NTFY_HEADERS }}' -- 2.34.1 From 2df67dd99dc3d46db686d08ca43d42df659ac40a Mon Sep 17 00:00:00 2001 From: sebastian Date: Thu, 15 Feb 2024 19:39:47 +0100 Subject: [PATCH 09/15] Try with auth keyword and corrected secrets access --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 49a5a1c..b796cbb 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -26,6 +26,6 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: '${{ secrets.NTFY_HEADERS }}' + headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' -- 2.34.1 From dfce2688743f77c78d097a0df43469fdae33cedf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 15 Feb 2024 19:51:37 +0100 Subject: [PATCH 10/15] Differentiate Ntfy Notification when success/failure --- .gitea/workflows/demo.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index b796cbb..a2b448f 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -21,11 +21,29 @@ jobs: - name: Run e2e tests run: npm run e2e - - name: ntfy-notifications + + - name: ntfy-notifications-failure uses: niniyas/ntfy-action@master + if: failure() with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' + priority: 5 + tags: +1,partying_face,action,failed + details: Workflow has failed! + actions: 'default' + - name: ntfy-notifications-success + uses: niniyas/ntfy-action@master + if: success() + with: + url: ${{ secrets.NTFY_URL }} + topic: ${{ secrets.NTFY_TOPIC }} + priority: 4 + headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' + tags: +1,partying_face,action,successfully,completed + details: Workflow has been successfully completed! + icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png' + image: true -- 2.34.1 From 7c6733e4124a3967dd63f84108a3ffa060e598fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 15 Feb 2024 19:56:36 +0100 Subject: [PATCH 11/15] Test failing testpipeline --- e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts b/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts index 00688ac..fefda8b 100644 --- a/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts +++ b/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts @@ -14,7 +14,7 @@ test.describe('Test ScriptAccounts', () => { expect(scriptAccunt.componentName).toEqual("ScriptAccount"); expect(scriptAccunt.componentDescription).toEqual("Description"); expect(scriptAccunt.type).toEqual(ModelComponentType.SCRIPTACCOUNT); - expect(scriptAccunt.minValue).toEqual(0); + expect(scriptAccunt.minValue).toEqual(2); expect(scriptAccunt.maxValue).toEqual(100); }) -- 2.34.1 From 6934bcfb51e493d406186df7b3b1de4bb4bdd491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 15 Feb 2024 20:00:55 +0100 Subject: [PATCH 12/15] Swap Order of headers and prio --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index a2b448f..6fac7b1 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -28,8 +28,8 @@ jobs: with: url: ${{ secrets.NTFY_URL }} topic: ${{ secrets.NTFY_TOPIC }} - headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' priority: 5 + headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' tags: +1,partying_face,action,failed details: Workflow has failed! actions: 'default' -- 2.34.1 From cc2ff05e9a5295113783ba417b4077df1a952054 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 15 Feb 2024 20:05:02 +0100 Subject: [PATCH 13/15] Hopefully fix Failing ntfycation --- .gitea/workflows/demo.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 6fac7b1..7ddc555 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -30,9 +30,10 @@ jobs: topic: ${{ secrets.NTFY_TOPIC }} priority: 5 headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' - tags: +1,partying_face,action,failed + tags: +1,partying_face,action,failed, details: Workflow has failed! - actions: 'default' + icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png' + image: true - name: ntfy-notifications-success uses: niniyas/ntfy-action@master -- 2.34.1 From c44dd07a86044cc9f8f1ad1019fdb1f382422ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 15 Feb 2024 20:09:28 +0100 Subject: [PATCH 14/15] Switch emoyies in failing notification --- .gitea/workflows/demo.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/demo.yaml b/.gitea/workflows/demo.yaml index 7ddc555..0514f8f 100644 --- a/.gitea/workflows/demo.yaml +++ b/.gitea/workflows/demo.yaml @@ -30,7 +30,7 @@ jobs: topic: ${{ secrets.NTFY_TOPIC }} priority: 5 headers: '{"authorization": "${{ secrets.NTFY_HEADERS }}"}' - tags: +1,partying_face,action,failed, + tags: -1,rotating_light,action,failed, details: Workflow has failed! icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png' image: true -- 2.34.1 From 711dca3f9d64cb3374a5f7f6dcfbf5dc3905f26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Thu, 15 Feb 2024 20:11:33 +0100 Subject: [PATCH 15/15] Fix failing testcase --- e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts b/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts index fefda8b..00688ac 100644 --- a/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts +++ b/e2e/game-model/scriptAccounts/ScriptAccountTest.spec.ts @@ -14,7 +14,7 @@ test.describe('Test ScriptAccounts', () => { expect(scriptAccunt.componentName).toEqual("ScriptAccount"); expect(scriptAccunt.componentDescription).toEqual("Description"); expect(scriptAccunt.type).toEqual(ModelComponentType.SCRIPTACCOUNT); - expect(scriptAccunt.minValue).toEqual(2); + expect(scriptAccunt.minValue).toEqual(0); expect(scriptAccunt.maxValue).toEqual(100); }) -- 2.34.1