From fcfa854b6f9db1a604810cb45f84e739f509ed4b Mon Sep 17 00:00:00 2001 From: Klejvi Kapaj <40796367+kl3jvi@users.noreply.github.com> Date: Mon, 27 May 2024 17:27:39 +0200 Subject: [PATCH] Update send_notification.yml --- .github/workflows/send_notification.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/send_notification.yml b/.github/workflows/send_notification.yml index 8e78449..a8f814c 100644 --- a/.github/workflows/send_notification.yml +++ b/.github/workflows/send_notification.yml @@ -11,15 +11,19 @@ jobs: steps: - name: Send Notification run: | - response=$(curl -X POST "https://onesignal.com/api/v1/notifications" \ - -H "Authorization: Basic ${{ secrets.ONESIGNAL_API_KEY }}" \ - -H "Content-Type: application/json" \ - --data '{ + echo "Starting the notification process..." + response=$(curl --request POST \ + --url https://onesignal.com/api/v1/notifications \ + --header 'Authorization: Basic ${{ secrets.ONESIGNAL_API_KEY }}' \ + --header 'accept: application/json' \ + --header 'content-type: application/json' \ + --data ' + { "app_id": "${{ secrets.ONESIGNAL_APP_ID }}", "included_segments": ["All"], "headings": {"en": "${{ github.event.release.name }}"}, "contents": {"en": "${{ github.event.release.body }}"}, "url": "${{ github.event.release.html_url }}" - }') - - echo "Response from OneSignal: $response" + } + ') + echo "Notification sent. Response from OneSignal: $response"