Skip to content

ci: generate badge with hours spent #1

ci: generate badge with hours spent

ci: generate badge with hours spent #1

Workflow file for this run

name: Badges
on:
push:
branches:
- main
jobs:
git-estimate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: '1.22.1'
- name: Estimate time spent
run: |
go install github.com/luigitni/git-estimate@latest
sudo apt install jq jo
HOURS=$(git-estimate -json | jq '.overall.hours | round')
jo -p \
"schemaVersion=1" \
"label=⏳ Time spent" \
"message=$HOURS hours" \
"color=blue" \
"style=for-the-badge" > badge.json
- name: Store result
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.TOKEN }}
gist_id: 857079dd97da65c81fe488bfd456821a
file_path: badge.json