Skip to content

Commit

Permalink
adjust gist update
Browse files Browse the repository at this point in the history
  • Loading branch information
acocalypso committed Apr 8, 2024
1 parent 6d81e40 commit fc9c034
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,14 @@ jobs:
}
}' > updater.json
# Update Gist with updater.json content
- name: Update Gist
if: matrix.platform == 'ubuntu-20.04'
run: |
# Extract content of updater.json
UPDATER_JSON_CONTENT=$(cat updater.json)
# Get Gist ID from secrets
GIST_ID="${{ secrets.GIST_ID }}"
# Make a PATCH request to update the gist
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d "{\"files\":{\"updater.json\":{\"content\":\"$UPDATER_JSON_CONTENT\"}}}" "https://api.github.com/gists/$GIST_ID"
# Extract content of updater.json
UPDATER_JSON_CONTENT=$(cat updater.json)
# Get Gist ID from secrets
GIST_ID="${{ secrets.GIST_ID }}"
# Make a PATCH request to update the gist
curl -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d "{\"files\":{\"updater.json\":{\"content\":\"$UPDATER_JSON_CONTENT\"}}}" "https://api.github.com/gists/$GIST_ID"

0 comments on commit fc9c034

Please sign in to comment.