Skip to content

Commit 7c13938

Browse files
authored
Merge pull request #36 from Shikakiben/copilot/update-download-badges-workflow
[WIP] Update download badges workflow to use Gist
2 parents 5d341ce + a868256 commit 7c13938

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 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 }}}"
89+
-d "{\"files\": { \"$FILENAME\": { \"content\": $ESCAPED_CONTENT }}}"
9090
done

0 commit comments

Comments
 (0)