This gist is used to store JSON files for the shields.io endpoint badge API.
I use it to keep track of how much time I have spent on projects. The actual data is generated by CI. Here is an example of a GitHub Actions workflow for updating these files:
name: Badges
on:
push:
branches:
- main
jobs:
update-badge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Write badge JSON
run: |
sudo apt install jo
jo -p \
"schemaVersion=1" \
"label=Example label" \
"message=Example message" > badge.json
- name: Store result
uses: realiserad/actions-deploy-gist@main
with:
token: ${{ secrets.TOKEN }}
gist_id: gist_id
file_path: badge.json${{ secrets.TOKEN }} references a PAT with access to gists. gist_id is the ID of the gist as shown in the browser URL.