From c862eb8c90308a2912813df74f8332754c24ddb6 Mon Sep 17 00:00:00 2001 From: Yasin Date: Wed, 24 Apr 2024 22:07:12 +0200 Subject: Update webhook_translate.yml works on my machine --- .github/workflows/webhook_translate.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/webhook_translate.yml b/.github/workflows/webhook_translate.yml index 1998ee73..85ed7c3c 100644 --- a/.github/workflows/webhook_translate.yml +++ b/.github/workflows/webhook_translate.yml @@ -34,19 +34,16 @@ jobs: shell: bash run: | OUTPUT=$(go run github.com/josephburnett/jd@latest <(git show HEAD^:src/main/resources/assets/skyblocker/lang/en_us.json) <(git show HEAD:src/main/resources/assets/skyblocker/lang/en_us.json) || true) - OUTPUT=$(echo "$OUTPUT" | sed 's/"/\\"/g') - OUTPUT=$(echo "$OUTPUT" | sed 's/\\n/\\\\n/g') OUTPUT="\`\`\`diff $OUTPUT \`\`\`" - OUTPUT=$(jq -Rn --arg str "$OUTPUT" '$str' | sed -E "s|^(['\"])(.*)\1$|\2|g") JSON_PAYLOAD='{ "content": "<@&1134566053138145330>", "embeds": [ { "title": "Something Changed (Click me)", - "description": "'"${OUTPUT}"'", + "description": '"$(echo "$OUTPUT" | jq -Rsa .)"', "url": "https://translate.hysky.de/projects/Skyblocker/skyblocker", "color": 5808639, "image": { -- cgit