From 7ce1c6f981e7adf96c61210b74a4629e2f5c6444 Mon Sep 17 00:00:00 2001 From: Andrew Lytvynov Date: Wed, 13 Sep 2023 16:36:40 -0500 Subject: [PATCH] .github/workflows: fix slack-action format in govulncheck.yml (#9390) Currently slack messages for errors fail: https://github.com/tailscale/tailscale/actions/runs/6159104272/job/16713248204 ``` Error: Unexpected token in JSON at position 151 ``` This is likely due to the line break in the text. Restructure the message to use separate title/text and fix the slack webhook body. Updates #cleanup Signed-off-by: Andrew Lytvynov --- .github/workflows/govulncheck.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 1c9e488de..8376cbc4f 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -27,8 +27,9 @@ jobs: payload: > { "attachments": [{ - "text": "${{ job.status }}: ${{ github.workflow }} - () of ${{ github.repository }}@${{ github.ref_name }} by ${{ github.event.head_commit.committer.name }}", + "title": "${{ job.status }}: ${{ github.workflow }}", + "title_link": "https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks", + "text": "${{ github.repository }}@${{ github.sha }}", "color": "danger" }] }