From a9832da7d762fbd0af6e45cb4632032b23dd7855 Mon Sep 17 00:00:00 2001 From: Jim Shield Date: Mon, 8 Sep 2025 18:35:03 +0100 Subject: [PATCH] Update notify-discord.yml test 2 --- .github/workflows/notify-discord.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/notify-discord.yml b/.github/workflows/notify-discord.yml index 29c342e..cfbeebd 100644 --- a/.github/workflows/notify-discord.yml +++ b/.github/workflows/notify-discord.yml @@ -1,18 +1,20 @@ name: Discord Commit Notifier - on: push: - branches: - - '*' # triggers on all branches + branches: ['*'] jobs: notify: runs-on: ubuntu-latest steps: + - name: Validate event JSON (sanity check) + run: jq -e . "$GITHUB_EVENT_PATH" >/dev/null + - name: Send commit payload to Discord Bot env: URL: http://${{ secrets.DISCORDBOT }}:3000/github-commits + shell: bash run: | - curl -sS -X POST "$URL" \ + curl -sS --fail-with-body -X POST "$URL" \ -H 'Content-Type: application/json' \ - --data-binary @"$GITHUB_EVENT_PATH" \ No newline at end of file + --data-binary "@$GITHUB_EVENT_PATH"