From 0be4c284845777a14533fb76aca9d5ad1b31fb7a Mon Sep 17 00:00:00 2001 From: Andrew Leith Date: Wed, 8 Jan 2025 19:44:37 +0000 Subject: [PATCH] fix(workflows/slack webhook): encode JSON properly --- .github/workflows/docker.yaml | 2 +- .github/workflows/test.yaml | 2 +- .github/workflows/test_prod_config.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 904b8a97c9..bc66451009 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -121,5 +121,5 @@ jobs: - name: Notify Slack channel if this job failed if: ${{ failure() }} run: | - json="{'text':' CI is failing in !'}" + json='{"text":" CI is failing in !"}' curl -X POST -H 'Content-type: application/json' --data "$json" ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2e72c97d29..9d1450bdd3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -41,5 +41,5 @@ jobs: - name: Notify Slack channel if this job failed in default branch if: ${{ failure() && github.ref == 'refs/heads/main' }} run: | - json="{'text':' CI is failing in !'}" + json='{"text":" CI is failing in !"}' curl -X POST -H 'Content-type: application/json' --data "$json" ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/test_prod_config.yaml b/.github/workflows/test_prod_config.yaml index 39af044740..d166353705 100644 --- a/.github/workflows/test_prod_config.yaml +++ b/.github/workflows/test_prod_config.yaml @@ -44,5 +44,5 @@ jobs: - name: Notify Slack channel if this job failed in default branch if: ${{ failure() && github.ref == 'refs/heads/main' }} run: | - json="{'text':' CI is failing in !'}" + json='{"text":" CI is failing in !"}' curl -X POST -H 'Content-type: application/json' --data "$json" ${{ secrets.SLACK_WEBHOOK }}