Skip to content

Commit

Permalink
ci: generate badge with hours spent
Browse files Browse the repository at this point in the history
  • Loading branch information
Realiserad committed Mar 16, 2024
1 parent eae892d commit 7e9dd7d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/azure-test-tapes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
jobs:
docker:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +22,7 @@ jobs:
azure_deployment = ${{ secrets.AZURE_DEPLOYMENT }}
api_key = ${{ secrets.API_KEY }}
EOF
- name: Build container
- name: Run containerised tests
uses: docker/build-push-action@v5
with:
context: .
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/badges.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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

0 comments on commit 7e9dd7d

Please sign in to comment.