From a2ac775c668dc4d2783c55ca62395a56f94d7cbd Mon Sep 17 00:00:00 2001 From: Wesley de Groot Date: Sun, 7 Apr 2024 21:18:51 +0200 Subject: [PATCH] Update build script --- .github/workflows/update_contributors.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_contributors.yml b/.github/workflows/update_contributors.yml index d7d6d9b..5378da4 100644 --- a/.github/workflows/update_contributors.yml +++ b/.github/workflows/update_contributors.yml @@ -61,14 +61,15 @@ jobs: sha=${{ steps.get_sha.outputs.sha }} commit_message="Update Contributors (`date`)" api_url="https://api.github.com/repos/AuroraEditor/auroraeditor.com/contents/public/data/contributors.json" - json="{\"message\": \"$commit_message\", \"content\": \"$(base64 <<< `cat contributors.json`)\", \"branch\": \"main\", \"sha\": \"$sha\"}" - echo "JSON: $json" + json="{\"message\": \"$commit_message\", \"content\": \"$(base64 -i contributors.json -w 0)\", \"branch\": \"main\", \"sha\": \"$sha\"}" # Use curl to create the commit with the updated JSON file curl -H "Authorization: Bearer $PAT" -X PUT \ -d json \ "$api_url" + echo "JSON: $json" + - name: Upload 'contributors.json' to repo run: | git config --global user.name 'aurora-care-bear'