Skip to content

Commit 23ec06a

Browse files
committed
Fix update-download-badges workflow for JSON escaping
1 parent 4181e37 commit 23ec06a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/update-download-badges.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ jobs:
8383
run: |
8484
for badge in appimage zsync; do
8585
FILENAME="$badge.json"
86-
RAW_CONTENT=$(cat "$BADGES_DIR/$FILENAME")
86+
ESCAPED_CONTENT=$(jq -Rs . < "$BADGES_DIR/$FILENAME")
8787
curl -s -X PATCH "https://api.github.com/gists/$GIST_ID" \
8888
-H "Authorization: token $GIST_TOKEN" \
89-
-d "{\"files\": { \"$FILENAME\": { \"content\": $RAW_CONTENT }}}"
90-
done
89+
-d "{\"files\": { \"$FILENAME\": { \"content\": $ESCAPED_CONTENT }}}"
90+
done

0 commit comments

Comments
 (0)